54406b80d5d435970989acff7b22dd6146c6b411
braney
  Sat Jan 22 15:24:59 2022 -0800
adding chrom alias support to big files

diff --git src/hg/lib/hgHgvs.c src/hg/lib/hgHgvs.c
index 0ddb0bd..5c55a6e 100644
--- src/hg/lib/hgHgvs.c
+++ src/hg/lib/hgHgvs.c
@@ -2,30 +2,31 @@
 /* See http://varnomen.hgvs.org/ and https://github.com/mutalyzer/mutalyzer/ */
 
 /* Copyright (C) 2016 The Regents of the University of California
  * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */
 #include "common.h"
 #include "hgHgvs.h"
 #include "bPlusTree.h"
 #include "chromInfo.h"
 #include "genbank.h"
 #include "hdb.h"
 #include "indelShift.h"
 #include "lrg.h"
 #include "pslTransMap.h"
 #include "regexHelper.h"
 #include "trackHub.h"
+#include "chromAlias.h"
 
 void hgvsVariantFree(struct hgvsVariant **pHgvs)
 // Free *pHgvs and its contents, and set *pHgvs to NULL.
 {
 if (pHgvs && *pHgvs)
     {
     struct hgvsVariant *hgvs = *pHgvs;
     freez(&hgvs->seqAcc);
     freez(&hgvs->seqGeneSymbol);
     freez(&hgvs->changes);
     freez(pHgvs);
     }
 }
 
 // Regular expressions for HGVS-recognized sequence accessions: LRG, ENS* or versioned RefSeq:
@@ -1010,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 = bigBedFileOpen(fileNameRep);
+bbi =  bigBedFileOpenAlias(fileNameRep, chromAliasGetHash(db));
 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)
         {