纠正错误 / Fix 添加实例 / Add example
文件格式 / Formats

samtools

处理 SAM/BAM/CRAM 比对文件的核心工具箱。Core toolkit for manipulating SAM/BAM/CRAM alignment files.

速览 | Quick Look

安装 | Install

mamba install -c bioconda samtools

常用命令 | Common Commands

SAM 转排序 BAM:

samtools sort -@ 8 -o sample.sorted.bam sample.sam

建立索引:

samtools index sample.sorted.bam

按区域查看:

samtools view -h sample.sorted.bam chr1:100000-200000

基础统计:

samtools flagstat sample.sorted.bam > sample.flagstat.txt
samtools idxstats sample.sorted.bam > sample.idxstats.txt

计算深度:

samtools depth -a sample.sorted.bam > sample.depth.tsv

关键参数 | Key Options

常见坑 | Pitfalls

参考 | References