BWA is a software package for mapping low-divergent sequences against a large reference genome.
Command & Options:
build index
Before alignment, the FM-index needs to be constructed for the reference genome.
Options
-p STR Prefix of the output database [same as db filename]-a [is|bwtsw] # Algorithm for constructing BWT index.is # IS is the default algorithm. IS is moderately fast, but does not work with database larger than 2GB.bwtsw # Bwtsw works with larger genomic database, such as the human genome.
bwa mem
map to more than one contig
Options
-t <INT> # Number of threads-M # Mark shorter split hits as secondary (for Picard compatibility).-p
If mates.fq file is absent and option -p is not set, this command regards input reads are single-end. If mates.fq is present, this command assumes the i-th read in reads.fq _and the i-th read in mates.fq constitute a read pair (pair-end) . If -p is used, the command assumes the 2i-th and the (2i+1)-th read in reads.fq_ constitute a read pair (such input file is said to be interleaved). In this case, mates.fq is ignored.
Pipeline
$ bwa index Wuhan-Hu-1.fasta

$ bwa mem -t 4 -M ~/SARS_CoV_2/mapping/ref/Wuhan-Hu-1.fasta \~/SARS_CoV_2/clean_data/P3-VERO-P3-1-vero_L4_1.fq.gz \~/SARS_CoV_2/clean_data/P3-VERO-P3-1-vero_L4_2.fq.gz \> ~/SARS_CoV_2/mapping/P3-VERO-P3-1-vero_L4.sam \2> ~/SARS_CoV_2/mapping/bwa_1.log
More information:
http://bio-bwa.sourceforge.net/bwa.shtml
https://github.com/lh3/bwa
