Question: Check if the VCF file derived from that BAM file
gravatar for LimMo
11 months ago by
LimMo0 wrote:

Hi all,

I'm wondering if I could check if a VCF file is derived from that BAM file.

I know how to generate the VCF file from the BAM file through different pipelines but I'm just asking if there is/are such a way to check/just to be sure especially if I have many VCF files and BAM files and I want to check which each VCF file belong to which BAM file.

I appreciate your help in advance.

bam vcf • 313 views
ADD COMMENTlink written 11 months ago by LimMo0

I would load both files into a genome viewer such as IGV and check for a couple of variants if the REF and ALT nucleotides are supported by the reads in the BAM.

ADD REPLYlink written 11 months ago by ATpoint36k

Maybe but it's not a generic way, it's better to have another command-based way

ADD REPLYlink written 11 months ago by LimMo0

Yeah I know. The thing is that one would need to check if the REF and ALT depth/coverage is identical between the BAM and the VCF but the DPs in the VCF depent on how the variant caller calculates this and which MAPQ and basequal. theshold it uses. It is therefore not trivial to extract these info from the BAM without knowing the exact criteria from the variant caller which are not always easily-accessable so one would need to check the source code and then put this into a custom script. I pinged two expert guys on Twitter who are very much into these kind of things ( Pierre Lindenbaum, brentp ), maybe they have something.

ADD REPLYlink modified 11 months ago • written 11 months ago by ATpoint36k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1681 users visited in the last hour