Entering edit mode
9.4 years ago
wrel2015
•
0
Hello,
Does anyone know why I am getting this error with the Reader function in the PyVCF module. The VCF file used here was read normally using a Perl VCF module.
>>> fl = vcf.Reader(filename='sample.vcf.gz', compressed=True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ".local/lib/python2.7/site-packages/PyVCF-0.6.7-py2.7-linux-x86_64.egg/vcf/parser.py", line 288, in __init__
self._parse_metainfo()
File ".local/lib/python2.7/site-packages/PyVCF-0.6.7-py2.7-linux-x86_64.egg/vcf/parser.py", line 309, in _parse_metainfo
key, val = parser.read_info(line)
File ".local/lib/python2.7/site-packages/PyVCF-0.6.7-py2.7-linux-x86_64.egg/vcf/parser.py", line 123, in read_info
"One of the INFO lines is malformed: %s" % info_string)
SyntaxError: One of the INFO lines is malformed: ##INFO=<ID=SOMATIC,Number=.,Description="Somatic status of existing variant (from ensembl VEP) associated with the most severe consequence in the CQ field">
Many thanks
thank you Brian. This did quite down the INFO error but now there is a "contig lines malformation" error, I guess because the contig lines come after the INFO lines in the header and they too lack a "Type=String" attribute.
Is there an option in the Reader function of PyVCF that forces header lines to be read as strings or avoids me having to manipulate the header lines to make it work? For example if I were to read thousands of VCF files.