IndexError with cparse but not parser.py (_parse_samples)
Hi,
I am using pyvcf in a program to handle VCF files from SV callers. For the program MELT, I observed some strange behaviour. I can apply various filters while handling the file using pyVCF all is fine, however when I apply the a certain filter method from my own program the second time (i.e. the first time goes well), I get this error:
File "/home/fritjof/.local/lib/python2.7/site-packages/vcf/parser.py", line 588, in next samples = self._parse_samples(row[9:], fmt, record) File "/home/fritjof/.local/lib/python2.7/site-packages/vcf/parser.py", line 453, in _parse_samples self.samples, samples, samp_fmt, samp_fmt._types, samp_fmt._nums, site) File "vcf/cparse.pyx", line 25, in vcf.cparse.parse_samples (vcf/cparse.c:1463) IndexError: list index out of range
When I decactivate cparse by hardcoding cparse = None, it runs through. I am attaching the VCF file I get the error with.
offending_file.vcf.txt
As I said, it works for me now but there seems to be some inconsistency between the pycvf parse and cparse method and maybe this helps to for further development.
Best
Fritjof