samtools / htsjdk

A Java API for high-throughput sequencing data (HTS) formats.
http://samtools.github.io/htsjdk/
276 stars 244 forks source link

Error when reading a VCF 4.3 file with spaces in INFO field values #1667

Open jkmatila opened 1 year ago

jkmatila commented 1 year ago

According to the VCF 4.3 specification, spaces are allowed in INFO field values (unlike in VCF 4.2). However, trying to parse such a file fails with an error message "The VCF specification does not allow for whitespace in the INFO field", which seems to come from AbstractVCFCodec.java:515.

See VCF 4.3 spec, Section 1.6.1:

  1. INFO — [...] Space characters are allowed in values.
cmnbroad commented 1 year ago

Yes, thanks for reporting this. This is fixed in https://github.com/samtools/htsjdk/pull/1581 (and the commit with the fix is also in https://github.com/samtools/htsjdk/pull/1596).