off the samtools helplist, a new feature that's very helpful for exome / target region NGS studies
BTW, samtools is now able to compute read depth and call SNPs in regions specified by an input BED file. For both "samtools mpileup" (not pileup) and "bcftools view", you may provide the BED via the "-l" option. If the input has two numeric columns, it is parsed as a BED (region list); if has one numeric column, parsed as a position list file, so the "-l" option is backward compatible with old versions. It is also possible to retrieve alignments overlapping a BED file with
samtools view -L in.bed
. For mpileup, using "-l" to call SNPs in target/exome regions can be much faster than doing whole-genome calling and then filtering.
Heng
BTW, samtools is now able to compute read depth and call SNPs in regions specified by an input BED file. For both "samtools mpileup" (not pileup) and "bcftools view", you may provide the BED via the "-l" option. If the input has two numeric columns, it is parsed as a BED (region list); if has one numeric column, parsed as a position list file, so the "-l" option is backward compatible with old versions. It is also possible to retrieve alignments overlapping a BED file with
samtools view -L in.bed
. For mpileup, using "-l" to call SNPs in target/exome regions can be much faster than doing whole-genome calling and then filtering.
Heng
Can you give an example of the content of the list file?
ReplyDeleteGreetings
the in.bed? I assume it's just a normal bed file containing exome positions if u mean to filter by exome.
ReplyDelete