7413e7df50cd60ee13b79af99c6acbbe09215530 angie Fri Jan 25 12:42:25 2019 -0800 Accept VCF v4.3. We don't implement the full spec, but 1000 Genomes just released very simple VCF for GRCh38 that says it's v4.3 and we have to support them. diff --git src/lib/vcf.c src/lib/vcf.c index 246faaf..1fb7ad4 100644 --- src/lib/vcf.c +++ src/lib/vcf.c @@ -492,33 +492,33 @@ { dyStringAppend(dyHeader, line); dyStringAppendC(dyHeader, '\n'); parseMetadataLine(vcff, line); } slReverse(&(vcff->infoDefs)); slReverse(&(vcff->filterDefs)); slReverse(&(vcff->gtFormatDefs)); // Did we get the bare minimum VCF header with supported version? if (vcff->majorVersion == 0) { vcfFileWarn(vcff, "missing ##fileformat= header line? Assuming 4.1."); vcff->majorVersion = 4; vcff->minorVersion = 1; } -if ((vcff->majorVersion != 4 || vcff->minorVersion < 0 || vcff->minorVersion > 2) && +if ((vcff->majorVersion != 4 || vcff->minorVersion < 0 || vcff->minorVersion > 3) && (vcff->majorVersion != 3)) - vcfFileErr(vcff, "VCFv%d.%d not supported -- only v3.*, v4.0, v4.1 or v4.2", + vcfFileErr(vcff, "VCFv%d.%d not supported -- only v3.*, v4.0 - v4.3", vcff->majorVersion, vcff->minorVersion); // Next, one header line beginning with single "#" that names the columns: if (line == NULL) // EOF after metadata return vcff; char headerLineBuf[256]; if (line[0] != '#') { lineFileReuse(lf); vcfFileWarn(vcff, "Expected to find # followed by column names (\"#CHROM POS ...\"), " "assuming default VCF 4.1 columns"); safef(headerLineBuf, sizeof(headerLineBuf), "%s", vcfDefaultHeader); line = headerLineBuf; } dyStringAppend(dyHeader, line);