098b0567c51ecc6e2098f17d8fbcf9dcf4f830ca angie Tue Nov 13 12:25:19 2012 -0800 Problem: when we have a BAM or VCF track with per-chromosome files,and then view a chromosome for which there is no file (e.g. a random or hap), hgTracks was hitting an early errAbort that is more appropriate for a single-big-file track that is missing its filename. Fix: allow bbiNameFromTableChrom to return NULL if there is a seqName column and there simply isn't a file for that seqName. diff --git src/hg/hgc/vcfClick.c src/hg/hgc/vcfClick.c index bfbe8df..123941d 100644 --- src/hg/hgc/vcfClick.c +++ src/hg/hgc/vcfClick.c @@ -378,31 +378,30 @@ makeDisplayAlleles(rec, showLeftBase, leftBase, 5, FALSE, TRUE, displayAls); vcfGenotypesDetails(rec, tdb->track, displayAls); } void doVcfTabixDetails(struct trackDb *tdb, char *item) /* Show details of an alignment from a VCF file compressed and indexed by tabix. */ { #if (defined USE_TABIX && defined KNETFILE_HOOKS) knetUdcInstall(); if (udcCacheTimeout() < 300) udcSetCacheTimeout(300); #endif//def USE_TABIX && KNETFILE_HOOKS int start = cartInt(cart, "o"); int end = cartInt(cart, "t"); struct sqlConnection *conn = hAllocConnTrack(database, tdb); -// TODO: will need to handle per-chrom files like bam, maybe fold bamFileNameFromTable into this:: char *fileOrUrl = bbiNameFromSettingOrTableChrom(tdb, conn, tdb->table, seqName); hFreeConn(&conn); int vcfMaxErr = -1; struct vcfFile *vcff = NULL; /* protect against temporary network error */ struct errCatch *errCatch = errCatchNew(); if (errCatchStart(errCatch)) { vcff = vcfTabixFileMayOpen(fileOrUrl, seqName, start, end, vcfMaxErr, -1); } errCatchEnd(errCatch); if (errCatch->gotError) { if (isNotEmpty(errCatch->message->string)) warn("%s", errCatch->message->string);