Skip to content
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

handle empty string as none #264

Merged
merged 2 commits into from
Feb 5, 2017
Merged

Conversation

ericman93
Copy link

When VCF info field is empty string, add None to info dict

@martijnvermaat
Copy link
Collaborator

Cool, thanks!

Could you make the same change in cparse.pyx?

I see a few possible improvements for the test:

  1. Add the test case to the suite at the bottom of test_vcf.py (I'm sorry, this is not an optimal setup, but otherwise your test won't actually be executed by a standard python setup.py test).
  2. In the test VCF file, define the INFO fields in the header.
  3. Also use a flag INFO field (FLAG;EMPTY=;DOT=.;NOTEMPTY=6)
  4. Include a unary and n-ary variant of each field (EMPTY_1, EMPTY_N, DOT_1, DOT_N, etc), just like the currently unused fields in the header.

@martijnvermaat martijnvermaat merged commit 3b76ada into jamescasbon:master Feb 5, 2017
martijnvermaat added a commit that referenced this pull request Feb 5, 2017
@martijnvermaat
Copy link
Collaborator

I made the tests slightly more comprehensive and merged this.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants