parser does not track whether FILTER was explicitly set #114

Closed
AndrewUzilov opened this Issue Aug 6, 2013 · 1 comment

Comments

Projects
None yet
2 participants

Very nice tool, but one nitpick.

If the FILTER column is . (meaning no filters applied) or PASS, the _Record.FILTER attribute is an empty list. So, it impossible to tell whether the original VCF contained a . or PASS, since the convention for storing both is the same.

Yes, I know that it only makes sense to EITHER have the entire VCF file contain . in that col, OR have that col always explicitly specify PASS or the rejection criteria string. But in some use cases, PASS and . might be mixed in the same file, and that should be stored --- perhaps I am actually writing a parser designed to catch and fix malformed VCFs with this fixing, which are other syntactically valid.

A backwards-compatible solution is to just add a new attribute to _Record that tracks whether the FILTER value was ever set or not.

I cloned this repo and hacked in the change ( [https://github.com/AndrewUzilov/PyVCF.git] ), so pull from there or I can do a pull request if OK.

@martijnvermaat martijnvermaat added a commit to martijnvermaat/PyVCF that referenced this issue Aug 7, 2013

@martijnvermaat martijnvermaat Differentiate between no filtering and PASS 67b21a1
Collaborator

martijnvermaat commented Aug 7, 2013

Thanks for the report, I propose another implementation in #115.

@gotgenes gotgenes pushed a commit to gotgenes/PyVCF that referenced this issue May 13, 2014

@martijnvermaat martijnvermaat Differentiate between no filtering and PASS 76ad332
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment