Differentiate between no filtering and PASS #115

Merged
merged 1 commit into from Aug 16, 2013

Conversation

Projects
None yet
2 participants
Collaborator

martijnvermaat commented Aug 7, 2013

Fixes #114

In #114, @AndrewUzilov proposes to track this in a separate field, but I actually think we should do it in a more direct way by explicitely storing None if there was no filtering.

Keeping it open for discussion, if there are no objections I'll merge it in a few days.

I like this idea. I only proposed storing . in FILTER column versus no . as a separate _Record attribute in #114 because I didn't want to break any code that might rely on _Record.FILTER always being a list (even if it is an empty list). But myself personally, I'd be happier if _Record.FILTER is None denoted the . filter value in source VCF.

Collaborator

martijnvermaat commented Aug 7, 2013

It's of course a valid concern, but I would say it is worth it to make this backwards incompatible change to have a better API.

Also, I imagine there isn't that many code around really depending on it, since the most obvious check will still work:

if record.FILTER:
    do_something()

Thanks for sharing your thoughts.

martijnvermaat added a commit that referenced this pull request Aug 16, 2013

Merge pull request #115 from martijnvermaat/filter-pass-none
Differentiate between no filtering and PASS

@martijnvermaat martijnvermaat merged commit cd30d62 into jamescasbon:master Aug 16, 2013

gotgenes pushed a commit to gotgenes/PyVCF that referenced this pull request May 13, 2014

Merge pull request #115 from martijnvermaat/filter-pass-none
Differentiate between no filtering and PASS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment