fa61094c53e0c3bb6a6ef2b8235c0744aeb5f7c3 angie Wed Jul 29 18:22:22 2020 -0700 Tolerate extra stuff (such as whitespace) after the VCF version number in ##fileformat line. (no RM, Russ ran into trouble with it) diff --git src/lib/vcf.c src/lib/vcf.c index b38cbc6..5b17054 100644 --- src/lib/vcf.c +++ src/lib/vcf.c @@ -252,31 +252,31 @@ if (sameString("Integer", typeWord)) return vcfInfoInteger; if (sameString("Float", typeWord)) return vcfInfoFloat; if (sameString("Flag", typeWord)) return vcfInfoFlag; if (sameString("Character", typeWord)) return vcfInfoCharacter; if (sameString("String", typeWord)) return vcfInfoString; vcfFileErr(vcff, "Unrecognized type word \"%s\" in metadata line \"%s\"", typeWord, line); return vcfInfoString; } // Regular expressions to check format and extract information from header lines: -static const char *fileformatRegex = "^##(file)?format=VCFv([0-9]+)(\\.([0-9]+))?$"; +static const char *fileformatRegex = "^##(file)?format=VCFv([0-9]+)(\\.([0-9]+))?"; static const char *infoOrFormatRegex = "^##(INFO|FORMAT)=" "<ID=([\\.+A-Za-z0-9_:-]+)," "Number=([\\.AGR]|[0-9-]+)," "Type=([A-Za-z]+)," "Description=\"?(.*)\"?>$"; static const char *filterOrAltRegex = "^##(FILTER|ALT)=" "<ID=([^,]+)," "(Description|Type)=\"?(.*)\"?>$"; // VCF version 3.3 was different enough to warrant separate regexes: static const char *infoOrFormatRegex3_3 = "^##(INFO|FORMAT)=" "([A-Za-z0-9_:-]+)," "(\\.|A|G|[0-9-]+),"