b622d147b7dbac52dbf3ba26928cd18e02d42bd8 braney Sat Feb 26 12:34:37 2022 -0800 add support for using a bigBed as the chromAlias file diff --git src/hg/lib/hgHgvs.c src/hg/lib/hgHgvs.c index 93f489b..1a27a47 100644 --- src/hg/lib/hgHgvs.c +++ src/hg/lib/hgHgvs.c @@ -1011,31 +1011,31 @@ 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); -bbi = bigBedFileOpenAlias(fileNameRep, chromAliasChromToAliasHash(db)); +bbi = bigBedFileOpenAlias(fileNameRep, chromAliasFindAliases); 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) {