e275bb31c96733585d0a1d511fa992f10fa56b69 chmalee Fri Oct 31 16:13:13 2025 -0700 Support gnomAD variation and range specifiers like 4-1234-2234 and 5-12345-A-C, refs #36388 diff --git src/hg/js/hgGateway.js src/hg/js/hgGateway.js index b90748044c2..185e4dcfb49 100644 --- src/hg/js/hgGateway.js +++ src/hg/js/hgGateway.js @@ -1567,31 +1567,33 @@ $('body').append($form); $form.trigger("submit"); } else { window.location.assign("../cgi-bin/hgSearch?search=" + searchTerm + "&hgsid="+ window.hgsid ); } } function onFail(jqXHR, textStatus) { window.location.assign("../cgi-bin/hgSearch?search=" + searchTerm + "&hgsid="+ window.hgsid ); } var canonMatch = position.match(canonicalRangeExp); var gbrowserMatch = position.match(gbrowserRangeExp); var lengthMatch = position.match(lengthRangeExp); var bedMatch = position.match(bedRangeExp); var sqlMatch = position.match(sqlRangeExp); var singleMatch = position.match(singleBaseExp); - var positionMatch = canonMatch || gbrowserMatch || lengthMatch || bedMatch || sqlMatch || singleMatch; + var gnomadRangeMatch = searchTerm.match(gnomadRangeExp); + var gnomadVarMatch = searchTerm.match(gnomadVarExp); + var positionMatch = canonMatch || gbrowserMatch || lengthMatch || bedMatch || sqlMatch || singleMatch || gnomadRangeMatch || gnomadVarMatch; if (positionMatch !== null || goDirectlyToHgTracks) { // We already have a position from either selecting a suggestion or the user just typed a regular // old position, so go to hgTracks at that location // Show a spinner -- sometimes it takes a while for hgTracks to start displaying. $('.jwGoIcon').removeClass('fa-play').addClass('fa-spinner fa-spin'); // Make a form and submit it. In order for this to work in IE, the form // must be appended to the body. $('body').append($form); $form.trigger("submit"); } else { // User has entered a search term with no suggestion, go to the disambiguation // page so the user can choose a position // redirect to hgBlat if the input looks like a DNA sequence // minimum length=19 so we do not accidentally redirect to hgBlat for a gene identifier // like ATG5