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

support for negative number in FORMAT (patch). #3

Closed
brentp opened this issue Jan 13, 2012 · 3 comments
Closed

support for negative number in FORMAT (patch). #3

brentp opened this issue Jan 13, 2012 · 3 comments

Comments

@brentp
Copy link

brentp commented Jan 13, 2012

Otherwise, can get an error on output from samtools.

diff --git a/vcf.py b/vcf.py
index e52ebd9..103bbef 100644
--- a/vcf.py
+++ b/vcf.py
@@ -130,7 +130,7 @@ class _vcf_metadata_parser(object):
             >''', re.VERBOSE)
         self.format_pattern = re.compile(r'''\#\#FORMAT=<
             ID=(?P<id>.+),
-            Number=(?P<number>\d+|\.|[AG]),
+            Number=(?P<number>-?\d+|\.|[AG]),
             Type=(?P<type>.+),
             Description="(?P<desc>.*)"
             >''', re.VERBOSE)
@martijnvermaat
Copy link
Collaborator

In my branch, this is commit martijnvermaat/PyVCF@be8c5f3

@brentp
Copy link
Author

brentp commented Jan 14, 2012

ah. that's better. i just got it far enough not to error on my data.

@jamescasbon
Copy link
Owner

committed 'git cherry-pick be8c5f31e13bad1b77622acab25968a8af6e6455'

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

No branches or pull requests

3 participants