8ecd4ec7a45dc9f84f487d829b648f69c05fa862 hiram Wed Aug 28 15:11:22 2024 -0700 adding four columns to the database table for more accurate search refs #32596 diff --git src/hg/inc/assemblyList.h src/hg/inc/assemblyList.h index ffa81b9..a596342 100644 --- src/hg/inc/assemblyList.h +++ src/hg/inc/assemblyList.h @@ -1,40 +1,44 @@ /* assemblyList.h was originally generated by the autoSql program, which also * generated assemblyList.c and assemblyList.sql. This header links the database and * the RAM representation of objects. */ #ifndef ASSEMBLYLIST_H #define ASSEMBLYLIST_H #include "jksql.h" -#define ASSEMBLYLIST_NUM_COLS 9 +#define ASSEMBLYLIST_NUM_COLS 13 extern char *assemblyListCommaSepFieldNames; struct assemblyList /* listing all UCSC genomes, and all NCBI assemblies, with search priority, and status if browser available or can be requested */ { struct assemblyList *next; /* Next in singly linked list. */ char *name; /* UCSC genome: dbDb name or GenArk/NCBI accession */ unsigned *priority; /* assigned search priority */ char *commonName; /* a common name */ char *scientificName; /* binomial scientific name */ unsigned *taxId; /* Entrez taxon ID: www.ncbi.nlm.nih.gov/taxonomy/?term=xxx */ char *clade; /* approximate clade: primates mammals birds fish ... etc ... */ char *description; /* other description text */ unsigned char *browserExists; /* 1 == this assembly is available at UCSC, 0 == can be requested */ char *hubUrl; /* path name to hub.txt: GCF/000/001/405/GCF_000001405.39/hub.txt */ + unsigned *year; /* year of assembly construction */ + char *refSeqCategory; /* one of: reference, representative or na */ + char *versionStatus; /* one of: latest, replaced or suppressed */ + char *assemblyLevel; /* one of: complete, chromosome, scaffold or contig */ }; void assemblyListStaticLoadWithNull(char **row, struct assemblyList *ret); /* Load a row from assemblyList table into ret. The contents of ret will * be replaced at the next call to this function. */ struct assemblyList *assemblyListLoadByQuery(struct sqlConnection *conn, char *query); /* Load all assemblyList 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 assemblyListFreeList(). */ void assemblyListSaveToDb(struct sqlConnection *conn, struct assemblyList *el, char *tableName, int updateSize); /* Save assemblyList as a row to the table specified by tableName. @@ -73,29 +77,28 @@ void assemblyListOutput(struct assemblyList *el, FILE *f, char sep, char lastSep); /* Print out assemblyList. Separate fields with sep. Follow last field with lastSep. */ #define assemblyListTabOut(el,f) assemblyListOutput(el,f,'\t','\n'); /* Print out assemblyList as a line in a tab-separated file. */ #define assemblyListCommaOut(el,f) assemblyListOutput(el,f,',',','); /* Print out assemblyList as a comma separated list including final comma. */ void assemblyListJsonOutput(struct assemblyList *el, FILE *f); /* Print out assemblyList in JSON format. */ /* -------------------------------- End autoSql Generated Code -------------------------------- */ - #define defaultAssemblyListTableName "assemblyList" /* Name of table that maintains the list of all assemblies, whether * available here or could be built */ #define assemblyListTableConfVariable "hub.assemblyListTableName" /* the name of the hg.conf variable to use something other than the default */ char *assemblyListTableName(); /* return the assemblyList table name from the environment, * or hg.conf, or use the default. Cache the result */ #endif /* ASSEMBLYLIST_H */