-
Notifications
You must be signed in to change notification settings - Fork 242
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
equals in VCFInfoHeaderLine is using description.equals(other.description) ? #929
Comments
@lindenb There is a PR that has a pretty big refactoring of the header line hierarchy in an attempt to fix a number of issues similar to this one. (One of them was that the current implementation doesn't preserve additional tags for compound header lines at all, i.e., what if one of the lines has a version tag, or some other tag). I'd propose that we resolve this issue in the context of the review discussion for that PR. Unfortunately, the PR large because there are so many interdependent issues. Hopefully get to reviewing it soon. |
BTW, I'd be curious to know more about which GATK version and tool/code path failed. There are tests in both Picard and GATK where this exact case occurs (a set containing header lines that are identical except for description is used to create a header). Internally, the current VCFHeader implementation would only use one of the lines (because the ID must be unique for a given key), but it also preserves and roundtrips the other one. So there can be surprising results. |
GATK SelectVariants Version=3.7-0-gcfedb67 |
@lindenb Yeah, I've seen this issue with SelectVariants in both GATK3 and 4. Thanks. |
closing as #835 |
I think we should keep tracking this to ensure that it gets resolved as part of #835. |
Subject of the issue
A GATK program bugs because there are two fields with the same VCFInfoHeaderLine but the description is different. One is from my original VCF, the other is injected by GATK
Verify
The following code inserts two VCFInfoHeaderLine in a Set. They only differ on their description. The size of the set is 2.
Expected behaviour
I think the field description shouldn't be considered (?)
equals is defined in CompoundHeaderLine as
I can submit a PR to override equals in VCFInfoHeaderLine (and VCFFormatHeaderLine ? ) to set
The text was updated successfully, but these errors were encountered: