8d662255bea829d680d17220a0b049f5f9c02f16
hiram
  Fri Aug 21 22:32:26 2026 -0700
finalize asmAlias selection issue - if a given GenArk assembly is requested and it exists then use it, otherwise look for an alias refs #38082

diff --git src/hg/inc/asmAlias.h src/hg/inc/asmAlias.h
index e65706b0dd7..aaa9d2df09c 100644
--- src/hg/inc/asmAlias.h
+++ src/hg/inc/asmAlias.h
@@ -1,82 +1,88 @@
 /* asmAlias.h was originally generated by the autoSql program, which also 
  * generated asmAlias.c and asmAlias.sql.  This header links the database and
  * the RAM representation of objects. */
 
 #ifndef ASMALIAS_H
 #define ASMALIAS_H
 
 #include "jksql.h"
 #define ASMALIAS_NUM_COLS 2
 
 extern char *asmAliasCommaSepFieldNames;
 
 struct asmAlias
 /* correspondence of assembly identifiers to UCSC database or GenArk hub equivalents */
     {
     struct asmAlias *next;  /* Next in singly linked list. */
     char *alias;	/* external assembly name */
     char *browser;	/* UCSC genome browser equivalent */
     };
 
 void asmAliasStaticLoad(char **row, struct asmAlias *ret);
 /* Load a row from asmAlias table into ret.  The contents of ret will
  * be replaced at the next call to this function. */
 
 struct asmAlias *asmAliasLoadByQuery(struct sqlConnection *conn, char *query);
 /* Load all asmAlias from table that satisfy the query given.  
  * Where query is of the form 'select * from example where something=something'
  * or 'select example.* from example, anotherTable where example.something = 
  * anotherTable.something'.
  * Dispose of this with asmAliasFreeList(). */
 
 void asmAliasSaveToDb(struct sqlConnection *conn, struct asmAlias *el, char *tableName, int updateSize);
 /* Save asmAlias as a row to the table specified by tableName. 
  * As blob fields may be arbitrary size updateSize specifies the approx size
  * of a string that would contain the entire query. Arrays of native types are
  * converted to comma separated strings and loaded as such, User defined types are
  * inserted as NULL. This function automatically escapes quoted strings for mysql. */
 
 struct asmAlias *asmAliasLoad(char **row);
 /* Load a asmAlias from row fetched with select * from asmAlias
  * from database.  Dispose of this with asmAliasFree(). */
 
 struct asmAlias *asmAliasLoadAll(char *fileName);
 /* Load all asmAlias from whitespace-separated file.
  * Dispose of this with asmAliasFreeList(). */
 
 struct asmAlias *asmAliasLoadAllByChar(char *fileName, char chopper);
 /* Load all asmAlias from chopper separated file.
  * Dispose of this with asmAliasFreeList(). */
 
 #define asmAliasLoadAllByTab(a) asmAliasLoadAllByChar(a, '\t');
 /* Load all asmAlias from tab separated file.
  * Dispose of this with asmAliasFreeList(). */
 
 struct asmAlias *asmAliasCommaIn(char **pS, struct asmAlias *ret);
 /* Create a asmAlias out of a comma separated string. 
  * This will fill in ret if non-null, otherwise will
  * return a new asmAlias */
 
 void asmAliasFree(struct asmAlias **pEl);
 /* Free a single dynamically allocated asmAlias such as created
  * with asmAliasLoad(). */
 
 void asmAliasFreeList(struct asmAlias **pList);
 /* Free a list of dynamically allocated asmAlias's */
 
 void asmAliasOutput(struct asmAlias *el, FILE *f, char sep, char lastSep);
 /* Print out asmAlias.  Separate fields with sep. Follow last field with lastSep. */
 
 #define asmAliasTabOut(el,f) asmAliasOutput(el,f,'\t','\n');
 /* Print out asmAlias as a line in a tab-separated file. */
 
 #define asmAliasCommaOut(el,f) asmAliasOutput(el,f,',',',');
 /* Print out asmAlias as a comma separated list including final comma. */
 
 /* -------------------------------- End autoSql Generated Code -------------------------------- */
 
 char *asmAliasFind(char *alias);
 /* If this assembly is an alias for a db we know about, return it.  Otherwise return what we were sent. */
 
+char *asmAliasFindUnlessGenArk(char *alias);
+/* Like asmAliasFind(), but only translate through the asmAlias table if
+ * alias isn't already a real, existing GenArk hub -- an accession that
+ * resolves on its own should never be promoted to a merely "equivalent"
+ * alias. */
+
 #endif /* ASMALIAS_H */