c3786681696b93476299dfbfb832b355035861b1 hiram Sat Jun 29 15:13:45 2024 -0700 ready for an upgrade to the genark table to add columns currently maintain compatible behavior with previous genark table refs #32596; diff --git src/hg/inc/genark.h src/hg/inc/genark.h index 80d6ec6..a5d85a8 100644 --- src/hg/inc/genark.h +++ src/hg/inc/genark.h @@ -1,44 +1,46 @@ /* genark.h was originally generated by the autoSql program, which also * generated genark.c and genark.sql. This header links the database and * the RAM representation of objects. */ #ifndef GENARK_H #define GENARK_H #include "jksql.h" -#define GENARK_NUM_COLS 6 +#define GENARK_NUM_COLS 8 #define defaultGenarkTableName "genark" /* Name of table that maintains the names of hubs we'll automatically attach if referenced. */ #define genarkTableConfVariable "hub.genArkTableName" /* the name of the hg.conf variable to use something other than the default */ extern char *genarkCommaSepFieldNames; struct genark /* index to UCSC assembly hubs */ { struct genark *next; /* Next in singly linked list. */ char *gcAccession; /* GC[AF] accssion identifier, e.g.: GCF_000001405.39 */ char *hubUrl; /* path name to hub.txt: GCF/000/001/405/GCF_000001405.39/hub.txt */ char *asmName; /* assembly name: GRCh38.p13 */ char *scientificName; /* scientific name: Homo sapiens */ char *commonName; /* common name: human */ int taxId; /* taxon id: 9606 */ + int priority; /* search priority to order hgGateway results */ + char *clade; /* clade group in the GenArk system */ }; void genarkStaticLoad(char **row, struct genark *ret); /* Load a row from genark table into ret. The contents of ret will * be replaced at the next call to this function. */ struct genark *genarkLoadByQuery(struct sqlConnection *conn, char *query); /* Load all genark 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 genarkFreeList(). */ void genarkSaveToDb(struct sqlConnection *conn, struct genark *el, char *tableName, int updateSize); /* Save genark as a row to the table specified by tableName. @@ -88,17 +90,25 @@ /* Print out genark in JSON format. */ /* -------------------------------- End autoSql Generated Code -------------------------------- */ char *genarkUrl(char *accession); /* Return the URL to the genark assembly with this accession if present, * otherwise return NULL * */ char *genArkHubTxt(char *gcX); /* given a GC[AF]_012345678.9 name, return hub.txt URL */ char *genarkTableName(); /* return the genark table name from the environment, * or hg.conf, or use the default. Cache the result */ + +/* temporary function while the genark table is in transistion with + * new coluns being added, July 2024. Allows compatibility with existing + * genark table. + */ +int genArkColumnCount(); +/* return number of columns in genark table */ + #endif /* GENARK_H */