4ab22d829bff96467e64331dad271bcb0bc84de1
chmalee
  Tue Mar 24 15:22:00 2026 -0700
Force genark autocomplete results to send their genome identifier like GC[AF]_XXX as the db field to hgGateway back end, refs #37276

diff --git src/hg/js/utils.js src/hg/js/utils.js
index cea236c133a..19bb33736d8 100644
--- src/hg/js/utils.js
+++ src/hg/js/utils.js
@@ -5030,15 +5030,21 @@
                     $input.autocompleteCat("close");
                 } else {
                     $input.val("");
                     $input.autocompleteCat("search", "");
                     $input.focus();
                 }
             });
         }
     });
 }
 
 function capitalizeFirstLetter(string) {
   return string.charAt(0).toUpperCase() + string.slice(1);
 }
 
+// check whether an autocomplete item is for a genark assembly
+function isGenarkItem(item) {
+    return (typeof item.hubUrl !== "undefined" && item.hubUrl) &&
+        (typeof item.genome !== "undefined" && item.genome) &&
+        (item.genome.startsWith('GCA_') || item.genome.startsWith('GCF_'));
+}