bcftools icon indicating copy to clipboard operation
bcftools copied to clipboard

bcftools differs in depth from IGV and samtools

Open robertzeibich opened this issue 3 years ago • 3 comments

I would like to evaluate the performance of different variant callers based on the BAM file.

I tried samtools, but with samtools, I do not get information on strand bias, etc. Therefore, I want to use bcftools.

However, when I use bcftools, I notice that there is a difference in depth/coverage between IGV, samtools and bcftools:

IGV screenshot image

bcftools (top) and samtools (bottom) image

samtools read out image

How can I get the same/similar numbers, especially to IGV with bcftools? Help would be much appreciated.

Current command: bcftools mpileup /scratch/xm41/ct/bams/GRMH019.bam -f /scratch/xm41/hg38_resources/resources_broad_hg38_v0_Homo_sapiens_assembly38.fasta -r chr1:122519382-122519382 -A -Q 0 --ff UNMAP,DUP -a FORMAT/ADF,FORMAT/ADR

bcftools version: 1.14

robertzeibich avatar Dec 07 '22 06:12 robertzeibich

fixed it by adding the following: --max-depth 3000 --max-idepth 3000

robertzeibich avatar Dec 07 '22 06:12 robertzeibich

I noticed that there is still a difference regarding allele counts on the forward and reverse strand between IGV and bcftools. Do you know why?

image

Is there also a way to determine the GT with bcftools mpileup?

robertzeibich avatar Dec 07 '22 07:12 robertzeibich

The differences in depth are impossible to explain just from looking at screenshots. You'd need to look at all reads, check their flags etc.

The genotypes can be determined by the variant caller, as described here http://samtools.github.io/bcftools/howtos/variant-calling.html

pd3 avatar Dec 08 '22 10:12 pd3