8295800d611b301861e0b6e8597e856ae96abf78
chmalee
  Mon Nov 24 16:19:31 2025 -0800
successful HGVS searches get saved into the 'recent searches' dropdown on hgTracks. the position box tries to suggest hgvs when the search term is longer than 8 characters, otherwise we assume it's a gene, refs #35984

diff --git src/hg/lib/hgFind.c src/hg/lib/hgFind.c
index b9a39547369..14297b9b47f 100644
--- src/hg/lib/hgFind.c
+++ src/hg/lib/hgFind.c
@@ -721,31 +721,31 @@
 AllocVar(table);
 AllocVar(pos);
 
 slAddHead(&hgp->tableList, table);
 table->posList = pos;
 table->description = cloneString(tableDescription);
 table->name = cloneString(tableName);
 pos->chrom = chrom;
 pos->chromStart = start;
 pos->chromEnd = end;
 pos->name = cloneString(posName);
 pos->description = cloneString(posDescription);
 pos->browserName = cloneString(browserName);
 }
 
-static void fixSinglePos(struct hgPositions *hgp)
+void fixSinglePos(struct hgPositions *hgp)
 /* Fill in posCount and if proper singlePos fields of hgp
  * by going through tables... */
 {
 int posCount = 0;
 struct hgPosTable *table;
 struct hgPos *pos;
 
 for (table = hgp->tableList; table != NULL; table = table->next)
     {
     for (pos = table->posList; pos != NULL; pos = pos->next)
         {
 	++posCount;
 	if (pos->chrom != NULL)
 	    hgp->singlePos = pos;
 	}
@@ -3583,31 +3583,31 @@
 
 // a little data structure for combining multiple transcripts that resolve
 // to the same hgvs change. This struct can be used to fill out a struct hgPos
 struct hgvsHelper
     {
     struct hgvsHelper *next;
     char *chrom; // chromosome name of position
     int chromStart; // start of position
     int chromEnd; // end of position
     struct slName *validTranscripts; // valid transcripts/protein accessions for this position
     char *label; // corresponding hgvs term
     char *table; // type of match, LRG, NCBI, etc
     boolean mapError; // does this hgvs mapping result in a map error?
     };
 
-static boolean matchesHgvs(struct cart *cart, char *db, char *term, struct hgPositions *hgp,
+boolean matchesHgvs(struct cart *cart, char *db, char *term, struct hgPositions *hgp,
                             boolean measureTiming)
 /* Return TRUE if the search term looks like a variant encoded using the HGVS nomenclature
  * See http://varnomen.hgvs.org/
  * If search term is a pseudo hgvs term like GeneName AminoAcidPosition (RUNX2 Arg155) and
  * matches more than one transcript, fill out the hgp with the potential matches so the user
  * can choose where to go, otherwise return a singlePos */
 {
 boolean foundIt = FALSE;
 long startTime = clock1000();
 struct hgvsVariant *hgvsList = hgvsParseTerm(term);
 if (hgvsList == NULL)
     hgvsList = hgvsParsePseudoHgvs(db, term);
 if (hgvsList)
     {
     struct hgvsVariant *hgvs = NULL;