samtools / bcftools

This is the official development repository for BCFtools. See installation instructions and other documentation here http://samtools.github.io/bcftools/howtos/install.html
http://samtools.github.io/bcftools/
Other
679 stars 239 forks source link

bcftools differs in depth from IGV and samtools #1831

Open robertzeibich opened 1 year ago

robertzeibich commented 1 year ago

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 commented 1 year ago

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

robertzeibich commented 1 year ago

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?

pd3 commented 1 year ago

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