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

Retrieve header info? #197

Closed
ronammar opened this issue Mar 31, 2015 · 1 comment
Closed

Retrieve header info? #197

ronammar opened this issue Mar 31, 2015 · 1 comment

Comments

@ronammar
Copy link

Is there a way to retrieve header info that corresponds to the record attributes in the INFO field?

@martijnvermaat
Copy link
Collaborator

I'm not sure if I understand you correctly, but say you have an INFO field NS in a record (record.INFO['NS']), you are interested in the definition of NS as presented in the VCF header?

Then, yes, you can do something like this:

>>> reader = vcf.Reader(filename='test.vcf')
>>> reader.infos['NS']
Info(id='NS', num=1, type='Integer', desc='Number of Samples With Data', source=None, version=None)
>>> reader.infos['NS'].num
1

Please reopen this issue if that doesn't solve your problem.

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

2 participants