Fix ref_allele_mismatch in liftover_expr for indel variants #273
Fix ref_allele_mismatch in liftover_expr for indel variants #273mkanai wants to merge 2 commits intobroadinstitute:mainfrom
Conversation
ch-kr
left a comment
There was a problem hiding this comment.
I'm not fully qualified to review this PR (I'm not familiar with indel liftover), but I think this could would have to left-align/normalize indels to be fully correct? (maybe @konradjk knows more or can tag someone else for review?)
|
Sorry, I'm not sure I'm following. The examples you have are all SNPs, so I don't see how this affects indels. For the SNPs, yes, grabbing the ref context and checking for a flip is the ideal scenario, but note that it comes at the computational cost of the context lookup, so I'd advocate for a flag where you can turn it off. Edit to add: I see the lookup already exists, which I guess is fine |
|
Oh! I just realized this was two different suggestions (separated by "Additionally") - sorry about that! Yes, this seems sensible, though it could be worthwhile to have a documented example just so we can see what happens. |
Hi, it seems the current
ref_allele_mismatchdoesn't work when the original reference allele has more than one bp. This PR fixes the issue.Additionally, I found there are
ref_allele_mismatchcases where ref/alt flips between the builds. For example,chr3:195513874:T:C(GRCh38) corresponds to3:195240670:C:T(GRCh37).It is particularly confusing since it looks like
new_alleles == original_allelesbutref_allele_mismatchis true. Does it make sense to add a field e.g.ref_alt_flip? If so, I'd be happy to make a separate PR.