UnifiedGenotyper - How are regions to examine for Variant Calling (SNPs, Indels) detected?

CindyCindy Posts: 19Member

Hi there,

I just had a look at the code of the UnifiedGenotyper and how its Variant Calling algorithm is implemented (very well documented by the way :) . But now I wonder how GATK reads in the SAM file and finds out where the differences to the reference (SNPs, Indels) are that are then examined in the Variant Calling. I only see that the UnifiedGenotyper gets a set of alleles, but not where the alleles are actually determined. I have also found out that GATK is using Samtools for parsing SAM files, but have not found the point where the actual reads are parsed and processed (e.g., by using the CIGAR string). Are you maybe doing a local realignment before the actual Variant Calling from which you get the alleles?

I would appreciate if you could guide me to the right direction where this happens in the code.

Best regards,

Cindy

Best Answer

Answers

  • Geraldine_VdAuweraGeraldine_VdAuwera Posts: 6,643Administrator, GATK Developer admin

    Hi Cindy,

    UG does not do any local realignment before calling, unlike HaplotypeCaller, our newer caller, which does so.

    The alleles are "served" to the UG by the GATK engine during traversal of the genome. The engine's job here is to read in data from the bam (using samtools as you correctly identified), filter it and feed it to the UG in an appropriate way. Specifically, since the UG is what we call a LocusWalker, the engine takes the pileup of bases at each position in turn, does a few basic manipulations to identify alleles and attach relevant meta/quality information, and feeds that to the UG variant calling module.

    I can't point you to the relevant classes right now because I'm on a smartphone (not terribly convenient for navigating code) but if you look at it in an IDE you should be able to swim up the stream to where the alleles are constructed.

    If that doesn't help let me know and I'll give you more details once I'm at the office.

    Geraldine Van der Auwera, PhD

  • CindyCindy Posts: 19Member

    Hi Geraldine, thanks for such an immediate reply! :) So far, I have ended up at class TraversalEngine from which several other Traversal-classes (TraverseReadsNano?) inherit. I also found the ReadWalkers, but there does not seem to be the code I am looking for. I feel I am very close to the code segment I am interested in, but still could not figure out where it is hidden... I would appreciate if you could provide more details. :)

    Best regards,

    Cindy

Sign In or Register to comment.