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/inc/hgFind.h src/hg/inc/hgFind.h index 20ed35181b4..e25cab9a6e2 100644 --- src/hg/inc/hgFind.h +++ src/hg/inc/hgFind.h @@ -77,30 +77,41 @@ /* struct searchableTrack: essentially a few fields from a struct trackDb that we need to form the * searchCategory */ struct searchableTrack { struct searchableTrack *next; char *track; char *shortLabel; char *longLabel; char *description; unsigned char visibility; float priority; char *grp; }; +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 */ + +void fixSinglePos(struct hgPositions *hgp); +/* Fill in posCount and if proper singlePos fields of hgp + * by going through tables... */ struct hgPositions *hgPositionsFind(char *db, char *query, char *extraCgi, char *hgAppName, struct cart *cart, boolean multiTerm, boolean measureTiming, struct searchCategory *categories); /* Return container of tracks and positions (if any) that match term. */ struct hgPositions *hgFindSearch(struct cart *cart, char **pPosition, char **retChrom, int *retStart, int *retEnd, char *hgAppName, struct dyString *dyWarn, struct searchCategory *categories); /* If *pPosition is a search term, then try to resolve it to genomic position(s). * If unable to find a unique position then revert pPosition to lastPosition (or default position). * Return a container of matching tables and positions. Warnings/errors are appended to dyWarn. */ void hgPositionsHtml(char *db, struct hgPositions *hgp, char *hgAppName, struct cart *cart); /* Write multiple search results as HTML. */