eee42a0d307c33dd46c3ba259845934de0631f7c chmalee Thu Jan 19 11:08:22 2023 -0800 small text change to denote that an hgvs 'term' resulted in multiple positions, refs Max email diff --git src/hg/lib/hgFind.c src/hg/lib/hgFind.c index 3062b24..0312ced 100644 --- src/hg/lib/hgFind.c +++ src/hg/lib/hgFind.c @@ -3560,54 +3560,58 @@ helper->label = cloneString(term); helper->table = trackTable; hashAdd(uniqHgvsPos, chromPosIndex->string, helper); } if (dyStringLen(dyWarn) > 0) { helper->mapError = TRUE; dyStringPrintf(allWarnings, "%s%s", dyStringLen(allWarnings) > 0 ? "\n" : "", dyStringContents(dyWarn)); } } } if (mapErrCnt < hgvsListLen) // at least one of the hgvs terms mapped sucessfully, so we can go to that spot // or let the user pick a location { + int numPositions = 0; struct hashEl *hel, *helList= hashElListHash(uniqHgvsPos); for (hel = helList; hel != NULL; hel = hel->next) { helper = (struct hgvsHelper *)hel->val; if (!helper->mapError) { if (hgp->tableList == NULL) hgp->tableList = table; foundIt = TRUE; table->name = helper->table; struct hgPos *pos; AllocVar(pos); pos->chrom = helper->chrom; pos->chromStart = helper->chromStart - padding; pos->chromEnd = helper->chromEnd + padding; pos->name = slNameListToString(helper->validTranscripts, '/'); pos->description = cloneString(helper->label); pos->browserName = ""; slAddHead(&table->posList, pos); // highlight the mapped bases to distinguish from padding hgp->tableList->posList->highlight = addHighlight(db, helper->chrom, helper->chromStart, helper->chromEnd); + numPositions++; } } + if (numPositions > 1) + table->description = "HGVS search resulted in multiple positions, please select a transcript below"; } else // all of the positions mapped incorrectly, so the term was bad. However, we may // be able to still go to a general area around the term, so build that, warn the // user about their bad search term, and warn that this is not an exactly correct position // NOTE: There is a bug here in general, in that when mapping an hgvs term we don't // consider alternate haplotypes, and thus below we will always get at least some range // on the same chromosome within a gene, but if the mapping code were to change in the // future, we might end up with some weird coordinates { struct hashEl *hel, *helList= hashElListHash(uniqHgvsPos); if (helList) { if (hgp->tableList == NULL) hgp->tableList = table;