Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bwa: add page #12720

Merged
merged 11 commits into from
May 14, 2024
24 changes: 24 additions & 0 deletions pages/linux/bwa.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# bwa

> BWA is a short, low-divergent DNA sequences mapper against a large reference genome, such as the human genome.
phenolophthaleinum marked this conversation as resolved.
Show resolved Hide resolved
> More information: <https://github.com/lh3/bwa>.

- Index reference genome:
phenolophthaleinum marked this conversation as resolved.
Show resolved Hide resolved

`bwa index {{path/to/reference.fa}}`

- Map single-end reads (sequences) to indexed genome using 32 [t]*hreads and compress the result to save space:
phenolophthaleinum marked this conversation as resolved.
Show resolved Hide resolved

`bwa mem -t 32 {{path/to/reference.fa}} {{path/to/read_single_end.fq.gz}} | gzip -3 > {{path/to/alignment_single_end.sam.gz}}`
phenolophthaleinum marked this conversation as resolved.
Show resolved Hide resolved

- Map pair-end reads (sequences) to indexed genome using 32 [t]hreads and compress the result to save space:

`bwa mem -t 32 {{path/to/reference.fa}} {{path/to/read_pair_end_1.fq.gz}} {{path/to/read_pair_end_2.fq.gz}} | gzip -3 > {{path/to/alignment_pair_end.sam.gz}}`

- Map pair-end reads (sequences) to indexed genome using 32 [t]hreads with [m]arking shorter split hits as secondary for output SAM file compatibility in Picard software and compress the result:

`bwa mem -M -t 32 {{path/to/reference.fa}} {{path/to/read_pair_end_1.fq.gz}} {{path/to/read_pair_end_2.fq.gz}} | gzip -3 > {{path/to/alignment_pair_end.sam.gz}}`

- Map pair-end reads (sequences) to indexed genome using 32 [t]hreads with FASTA/Q [c]omments (e.g. BC:Z:CGTAC) appending to a compressed result:
phenolophthaleinum marked this conversation as resolved.
Show resolved Hide resolved

`bwa mem -C -t 32 {{path/to/reference.fa}} {{path/to/read_pair_end_1.fq.gz}} {{path/to/read_pair_end_2.fq.gz}} | gzip -3 > {{path/to/alignment_pair_end.sam.gz}}`
phenolophthaleinum marked this conversation as resolved.
Show resolved Hide resolved