3ccd2b6675cc1955d74aec568ef2fdc852bd3fd7 hiram Fri Jun 14 12:12:57 2024 -0700 adding a /list/genarkGenomes endpoint refs #23589 diff --git src/hg/hubApi/dataApi.h src/hg/hubApi/dataApi.h index d25f48b..70af4c8 100644 --- src/hg/hubApi/dataApi.h +++ src/hg/hubApi/dataApi.h @@ -22,30 +22,31 @@ #include "bigWig.h" #include "hubConnect.h" #include "obscure.h" #include "errCatch.h" #include "vcf.h" #include "bedTabix.h" #include "bamFile.h" #include "jsonParse.h" #include "jsonWrite.h" #include "chromInfo.h" #include "wiggle.h" #include "hubPublic.h" #include "cartTrackDb.h" #include "chromAlias.h" #include "pipeline.h" +#include "genark.h" #ifdef USE_HAL #include "halBlockViz.h" #endif /* test name for matching a GenArk hub genome name */ #define isGenArk(name) (startsWith("GCA_", name) || startsWith("GCF_", name)) /* reference for these error codes: * https://www.restapitutorial.com/httpstatuscodes.html */ /* error return codes */ #define err206 206 #define err206Msg "Partial Content" #define err301 301 @@ -73,30 +74,31 @@ #define argEnd "end" #define argMaxItemsOutput "maxItemsOutput" #define argFormat "format" #define argJsonOutputArrays "jsonOutputArrays" #define argCategories "categories" #define argSearchTerm "search" #define argGenomeSearchTerm "genomeSearch" #define argAllowAll "allowAll" #define argStatsOnly "statsOnly" /* valid argument listings to verify extraneous arguments * initialized in hubApi.c */ extern char *argListPublicHubs[]; extern char *argListUcscGenomes[]; +extern char *argListGenarkGenomes[]; extern char *argListHubGenomes[]; extern char *argListTracks[]; extern char *argListChromosomes[]; extern char *argListSchema[]; extern char *argListFiles[]; extern char *argGetDataTrack[]; extern char *argGetDataSequence[]; extern char *argSearch[]; extern char *argFindGenome[]; /* maximum number of words expected in PATH_INFO parsing * so far only using 2 */ #define MAX_PATH_INFO 32 @@ -199,30 +201,36 @@ */ /* temporarily from table browser until proven works, then move to library */ struct asObject *asForTable(struct sqlConnection *conn, char *table, struct trackDb *tdb); /* Get autoSQL description if any associated with table. */ /* Wrap some error catching around asForTable. */ struct trackHubGenome *findHubGenome(struct trackHub *hub, char *genome, char *endpoint, char *hubUrl); /* given open 'hub', find the specified 'genome' called from 'endpoint' */ struct dbDb *ucscDbDb(); /* return the dbDb table as an slList */ +long long genArkSize(); +/* return the number of rows in genark table */ + +struct genark *genArkList(char *oneAccession); +/* return the genark table as an slList, or just the one accession when given */ + boolean isSupportedType(char *type); /* is given type in the supportedTypes list ? */ void wigColumnTypes(struct jsonWrite *jw); /* output column headers for a wiggle data output schema */ void outputSchema(struct trackDb *tdb, struct jsonWrite *jw, char *columnNames[], char *columnTypes[], int jsonTypes[], struct hTableInfo *hti, int columnCount, int asColumnCount, struct asColumn *columnEl); /* print out the SQL schema for this trackDb */ void bigColumnTypes(struct jsonWrite *jw, struct sqlFieldType *fiList, struct asObject *as); /* show the column types from a big file autoSql definitions */