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
Can LiftoverVcf TAGS_TO_REVERSE be made more automatic? #1149
Comments
For example, AF is special-cased, but AC is also more or less a built-in field that is also allele level, but it does not get this special treatment. |
AC is a reasonable tag to add to the default, but I'm not sure how to automate and at the same time allow for over-ride. I'm happy to discuss possibilities or review a PR if you have a proposed implementation. |
The tool cant reasonably be expected to get everything right automatically. However, if a field is either A (per allele) or R (per allele plus ref), there is near certainty that swapping REF/ALT is going to leave them invalid. I understand the goal of lifting the maximum number of variants, but VCF file format is complex, and the current default behavior of this tool is quite likely to leave the user with invalid data, in a way that is pretty cryptic and hard to realize. It's useful to special-case AF (which is an admittedly important, but also annotation use-case), but this seem like an instance where this tool special-cases whatever narrow scenario drove the addition of the feature, but isnt doing an adequate job of thinking about the broader space. For solutions:
|
fixed |
Bug Report
Affected tool(s)
LiftoverVcf
Affected version(s)
Description
You recently added code to automatically try to reverse the REF/ALT alleles if the lifted variant is reverse complemented. As you recognized, this would sometimes invalidate INFO field tags. You special-cased AF and MAX_AF and added TAGS_TO_REVERSE; however, this is still pretty manual and easy for less sophisticated users to get wrong.
Can you actually inspect the header and use tags of type VCFHeaderLineType.A and VCFHeaderLineType.R to more automatically determine what needs to get reversed? This will not help with the MAX_AF situation, but it would help considerably over the current code.
Steps to reproduce
Expected behavior
Actual behavior
Feature request
Tool(s) involved
Tool name(s), special parameters?
Description
Specify whether you want a modification of an existing behavior or addition of a new capability.
Provide examples, screenshots, where appropriate.
Documentation request
Tool(s) involved
Tool name(s), parameters?
Description
Describe what needs to be added or modified.
The text was updated successfully, but these errors were encountered: