The "HOMSEQ" field in the INFO contains a string. #130

Closed
spvanleeuwen opened this Issue Nov 25, 2013 · 1 comment

Comments

Projects
None yet
2 participants

When parsing my VCF file I get the following error:

File "/usr/local/lib/python2.7/dist-packages/vcf/parser.py", line 341, in _map
for x in iterable]
ValueError: could not convert string to float: GCCAGGCTAGTCTT

VCF line:

chr1 66263909 . . . . PASS END=66264242;HOMLEN=14;HOMSEQ=GCCAGGCTAGTCTT;SVLEN=-333;SVTYPE=DEL

PyVCF expects an integer for this field while it contains a string (this is correct according to the VCF 4.1 documentation).

PyVCF code:

RESERVED_INFO = {
'AA': 'String', 'AC': 'Integer', 'AF': 'Float', 'AN': 'Integer',
'BQ': 'Float', 'CIGAR': 'String', 'DB': 'Flag', 'DP': 'Integer',
'END': 'Integer', 'H2': 'Flag', 'MQ': 'Float', 'MQ0': 'Integer',
'NS': 'Integer', 'SB': 'String', 'SOMATIC': 'Flag', 'VALIDATED': 'Flag',

# VCF 4.1 Additions
'IMPRECISE':'Flag', 'NOVEL':'Flag', 'END':'Integer', 'SVTYPE':'String',
'CIPOS':'Integer','CIEND':'Integer','HOMLEN':'Integer','HOMSEQ':'Integer',
'BKPTID':'String','MEINFO':'String','METRANS':'String','DGVID':'String',
'DBVARID':'String','MATEID':'String','PARID':'String','EVENT':'String',
'CILEN':'Integer','CN':'Integer','CNADJ':'Integer','CICN':'Integer',
'CICNADJ':'Integer'

}

Collaborator

martijnvermaat commented Nov 25, 2013

Thanks for reporting!

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

Fix incorrect and missing reserved INFO/FORMAT fields
The reserved HOMSEQ INFO field was incorrectly defined as Integer and some
other fields listed in the VCF spec were missing.

Fixes #130
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment