Find and replace in multifasta or fasta header with perl onliner
You have a fasta file and you want to replace: "|" You are told to replace that by "_" perl -i -p -e "s/\|/_/g" genome.fasta -i = inplace editing -p = loop over lines and print each line (after processing) -e = command line script1674 days ago
1663 days ago
Samtools commands for bioinformatician !
## count mapped reads samtools view -c -F 2...### sort reads by flag specified and show them # -f INT...### count reads (-c) by flag specified samtool view -c -f 4 s...ote: new command is "call". type "bcftools" to see current ver...: total reads, duplicates, mapped. samtools flagstat sorted_d...1661 days ago
Perl subroutine to creating kmer !
sub k_mers { my ($sequence, $k) = @_; my $len = length($sequence); my @result = (); for (my $i = 0; $i1625 days ago
Perl script to remove duplicated lines !
#!/usr/bin/perl use strict; use warnings; { $_ = ; my $next_line; while( $next_line = ) { #print "current line: $_ -- next line: $next_line$/";...1618 days ago
Bash script to alignment of short reads against reference genome !
..._K12_MG1655.fa SRR1770413_1.fastq.gz SRR1770413_2.fastq.gz --- this just specifies the base reference file...nversion to BAM: samtools view -b - --- this reads SAM from stdin (the - specifier in place of the file na...1617 days ago
1617 days ago
1615 days ago
Bash commandline to install Anaconda !
...ort the installation - Or specify a different location belo...-hdba287a_0 ... installing: jpeg-9b-h024ee3a_2 ... installin...0.3.4-py37_0 ... installing: pep8-1.7.1-py37_0 ... installin....1-py37_0 ... installing: pyopenssl-19.0.0-py37_0 ... instal...1614 days ago
Bash command to install Miniconda !
...Press CTRL-C to abort the installation - Or specify a different location belo...Press CTRL-C to abort the installation - Or specify a different location belo...pkgs/main/linux-64::ncurses-6.1-he6710b0_1 openssl pkgs/main/linu...1614 days ago