c2204b34508ac64160836ae01a16fe3f2baa3fd8 braney Thu Aug 19 13:25:45 2021 -0700 don't assume LRG bigBed is local cuz that will fail on GBiB diff --git src/hg/lib/hgHgvs.c src/hg/lib/hgHgvs.c index beb7b46..7c889e3 100644 --- src/hg/lib/hgHgvs.c +++ src/hg/lib/hgHgvs.c @@ -1006,31 +1006,30 @@ hgvs->changes = regexSubstringClone(term, substrs[changeIx]); } return hgvs; } static struct bbiFile *getLrgBbi(char *db) /* Return bbiFile for LRG regions or NULL if not found. */ { struct bbiFile *bbi = NULL; // I don't think this will be called often enough to warrant caching open bbi file (and index?). // I expect it to be called a couple times when the user enters a LRG genomic HGVS pos/search term. // It would be cleaner to get fileName from tdb or db -- but this is much quicker & easier: char fileName[1024]; safef(fileName, sizeof(fileName), "/gbdb/%s/bbi/lrg.bb", db); char *fileNameRep = hReplaceGbdb(fileName); -if (fileExists(fileNameRep)) bbi = bigBedFileOpen(fileNameRep); freeMem(fileNameRep); return bbi; } static struct lrg *loadLrgByName(char *db, char *lrgId) /* Retrieve lrg data from bigBed. */ { struct lrg *lrg = NULL; struct bbiFile *bbi = getLrgBbi(db); if (bbi) { int fieldIx = 0; struct bptFile *index = bigBedOpenExtraIndex(bbi, "name", &fieldIx); if (index)