154c7099790d6e8eda2af295357f00bb86e6f710 angie Wed Feb 26 14:52:01 2014 -0800 Use vcfTabixFileMayOpen instead of vcfFileMayOpen so that we alsocheck the tabix index file. diff --git src/hg/lib/trackHub.c src/hg/lib/trackHub.c index fd094f3..6e476ee 100644 --- src/hg/lib/trackHub.c +++ src/hg/lib/trackHub.c @@ -825,34 +825,36 @@ if (startsWithWord("bigWig", type)) { /* Just open and close to verify file exists and is correct type. */ struct bbiFile *bbi = bigWigFileOpen(bigDataUrl); bbiFileClose(&bbi); } else if (startsWithWord("bigBed", type)) { /* Just open and close to verify file exists and is correct type. */ struct bbiFile *bbi = bigBedFileOpen(bigDataUrl); bbiFileClose(&bbi); } else if (startsWithWord("vcfTabix", type)) { /* Just open and close to verify file exists and is correct type. */ - struct vcfFile *vcf = vcfFileMayOpen(bigDataUrl, 1, 1, FALSE); - + struct vcfFile *vcf = vcfTabixFileMayOpen(bigDataUrl, NULL, 0, 0, 1, 1); if (vcf == NULL) - errAbort("%s is not a VCF file", bigDataUrl); + // Warnings already indicated whether the tabix file is missing etc. + errAbort("Couldn't open %s and/or its tabix index (.tbi) file. " + "See http://genome.ucsc.edu/goldenPath/help/vcf.html", + bigDataUrl); vcfFileFree(&vcf); } else if (startsWithWord("bam", type)) { bamFileAndIndexMustExist(bigDataUrl); } else errAbort("unrecognized type %s in genome %s track %s", type, genome->name, tdb->track); freez(&bigDataUrl); } errCatchEnd(errCatch); if (errCatch->gotError) { retVal = 1; dyStringPrintf(errors, "%s", errCatch->message->string);