-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange genotype selection #322
Comments
I don't have a better suggestion than putting a breakpoint in and seeing what happens. If you have time for a call next week, i'd be up for a chat as I don't remember/understand why you are using local genotyping, i forget the reason. I think it is/was because of minor alleles. Isn't your drprg minor analysis basically driven by looking at the coverage on both alleles, and could work the same on local and global genotyping? sorry for this basic question, have lost track |
Sorry, was going to discuss with leandro, but he was teaching and then I was distracted. Will talk to him tomorrow! |
Motivation and justification.
Yes, but I still rely on the genotype. I only dig into null genotypes if they cross a start codon, and then, I'm just looking to see if we lose the gene (as a patch until #316 is sorted). I'm not really keen to ignore genotype and implement my own genotyping model when pandora has one already... I dug into this a little more and the only reason I can see if genotype compatibility. I've removed the allele as POS 330 from the graph too as that is what was causing the problem and it only occurs in one sample that we build the PRG from (out of ~150 samples) and it doesn't contain any common resistance variants. |
Fair enough, I'll chew on this. , |
Sorry for the delay! I think what is happening in the genotyped VCF:
with local genotyping is the following:
IIRC, it is sort of a greedy algorithm, working from the highest to the lowest confidence calls, and making lower-confidence calls compatible with higher-confidence calls... I guess @rmcolq could correct us in case of any (or many) mistakes! |
That makes sense. I just thought that because I'm using local genotyping it would override that process? |
That is how local genotyping works, or rather that's how Pandora tries to make local genotypes not self inconsistent. |
I think local genotyping is this process! Global genotyping will get the ML path and, for each site, will look at the most likely allele. If it agrees with the ML path (i.e. at site 1, ML path calls alt 1 and alt 1 is also the most likely) then it calls alt 1. Otherwise, it calls |
Sorry, did not see Zam's message before commenting, which is the same as mine, but much better summarised 😂 I think this is what happens, but also to be honest, last time I actually checked the genotyping code was some 2 years ago... |
Ohhh true. Yes, sorry I forgot global would just make it null. Thanks for clearing this up! |
I have a weird situation where pandora is selecting ref genotype when it should clearly be the alt - the alt has the highest likelihood.
The position in question is 351. However, for some reason make_prg has not merged it with the variant above it - which happens to also span position 351. BUT, I am using
--local
genotyping, so pandora shouldn't be trying to make genotypes compatible in this scenario?Here are the same positions in the consensus VCF
Any thoughts on what's happened here?
The text was updated successfully, but these errors were encountered: