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 script1629 days ago
Samtools commands for bioinformatician !
...### viewing bam files (view command) samtool view sal_sej.bam |...ying genome variants (mpileup command) # -g : output is bcf (binar...s" to see current version and commands ### calling snp and indel...$3}END{print s/c}' ### one liner to count coverage breadth s...1617 days ago
Perl script to remove duplicated lines !
#!/usr/bin/perl use strict; use warnings; { $_ = ; my $next_line; while( $next_line = ) { #print "curren...ne: $next_line$/"; print $_ if $_ ne $next_line; } continue { $...1574 days ago
Bash script to download SRA file !
#We can use the sratoolkit to directly pull the sequence data (in paired FASTQ format) from the archive. fastq-dump...to put things into FASTQ for further processing. The --split-files part of the comm...1573 days ago
Bash script to alignment of short reads against reference genome !
bwa mem -t 40 -R '@RG\tID:K12\tSM:K12' \ E.coli_K12_MG1655.fa SRR1770413_1.fastq....ba markdup SRR1770413.raw.sorted.bam SRR1770413.bam ##Breaking it down by line: #alignment with bwa: bwa...1573 days ago
Bash commandline to install Anaconda !
#The line begins with $ are the commands $ mkdir tmp $ cd tmp/ $ curl -O https://...mpfr-4.0.1-hdf1c602_3 ... installing: pandoc-2.2.3.2-0 ... installing: readline-7.0-h7b6447c_5 ... installin...1569 days ago
Bash command to install Miniconda !
(base) [wsu29@bladeamd-2 tmp]$ wget https://repo.anaconda.c...1=py37_0 - python==3.7.4=h265db76_1 - readline==7.0=h7b6447c_5 - reques...pkgs/main/linux-64::python-3.7.4-h265db76_1 readline pkgs/main/linux-64:...1569 days ago
Bash command to install bwa, samtools, picard !
(base) [wsu29@bladeamd-2 tmp]$ conda install bwa Collecting package metadata...r-base pkgs/r/linux-64::r-base-3.6.1-h9bb98a2_1 readline pkgs/main/linux-64::readline-7.0-h7b6447c_5 tktable...1569 days ago
Bash command to install GATK, Bedtools and SnpEff !
(my_GATK) [wsu29@bladeamd-2 tmp]$ conda install gatk Collecting package metadata (repodata.json): done Solving environment: done ## Package Plan ## environme...1569 days ago
Installing ggplot2 and its dependencies on Ubuntu !
jit@jit-HP-Pro-3335-MT:~/Downloads/MitoHunter/minidot/bin$...s. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for...-std=gnu99 -E checking for grep that handles long lines and -e... /bin/grep checkin...1564 days ago