Files
tldr/pages.zh/linux/bwa.md

25 lines
1.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# bwa
> Burrows-Wheeler比对工具。
> 针对大型参考基因组例如人类基因组进行短的、低差异的DNA序列映射。
> 更多信息:<https://github.com/lh3/bwa>。
- 索引参考基因组:
`bwa index {{path/to/reference.fa}}`
- 使用32个线程将单端读取序列映射到索引基因组并压缩结果以节省空间
`bwa mem -t 32 {{path/to/reference.fa}} {{path/to/read_single_end.fq.gz}} | gzip > {{path/to/alignment_single_end.sam.gz}}`
- 使用32个线程将双端读取序列映射到索引基因组并压缩结果以节省空间
`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 > {{path/to/alignment_pair_end.sam.gz}}`
- 使用32个线程将双端读取序列映射到索引基因组并将短的拆分比对标记为输出SAM文件兼容的次要比对以便于Picard软件使用并压缩结果
`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 > {{path/to/alignment_pair_end.sam.gz}}`
- 使用32个线程将双端读取序列映射到索引基因组并附加FASTA/Q注释例如BC:Z:CGTAC到压缩结果
`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 > {{path/to/alignment_pair_end.sam.gz}}`