Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changed the rule to split records into columns

According to the specification the columns must be tab separated. I encountered an VCF file from NCBI that has spaces in the INFO column, which caused PyVCF to fail.
http://www.1000genomes.org/wiki/Analysis/Variant%20Call%20Format/vcf-variant-call-format-version-41
  • Loading branch information...
commit fb835a2a3023116e8477412949eb10d7459f6a39 1 parent e63960c
@marcofalcioni marcofalcioni authored casbon committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  vcf/parser.py
View
2  vcf/parser.py
@@ -437,7 +437,7 @@ def _parse_alt(self, str):
def next(self):
'''Return the next record in the file.'''
line = self.reader.next()
- row = re.split('\t| +', line)
+ row = re.split('\t+', line)
chrom = row[0]
if self._prepend_chr:
chrom = 'chr' + chrom
Please sign in to comment.
Something went wrong with that request. Please try again.