快速计算 BAM/CRAM 覆盖度、深度分布和目标区域覆盖统计的工具。Fast coverage and depth calculation for BAM/CRAM files.
mamba install -c bioconda mosdepth
全基因组深度:
mosdepth -t 8 sample sample.sorted.bam
按 BED 区域统计:
mosdepth -t 8 --by targets.bed sample sample.sorted.bam
设置阈值统计覆盖比例:
mosdepth -t 8 --by targets.bed --thresholds 1,10,20,30 sample sample.bam
输出不压缩 per-base 文件:
mosdepth -t 8 --no-per-base sample sample.bam
--by:按 BED 或固定窗口统计。--thresholds:计算达到指定深度阈值的碱基数。--no-per-base:不输出逐碱基深度,节省空间。--fast-mode:跳过 CIGAR 细节,速度更快但不适合所有场景。-t:线程数。--no-per-base。