7c04d352647faab3ca7f194dc5f11f764d876ce3 hiram Tue Mar 21 13:44:35 2023 -0700 adding some chromAlias recognition for some getData functions refs #30544 diff --git src/hg/hubApi/dataApi.h src/hg/hubApi/dataApi.h index 1dea88f..32ec4c0 100644 --- src/hg/hubApi/dataApi.h +++ src/hg/hubApi/dataApi.h @@ -20,30 +20,31 @@ #include "hCommon.h" #include "hPrint.h" #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" #ifdef USE_HAL #include "halBlockViz.h" #endif /* reference for these error codes: * https://www.restapitutorial.com/httpstatuscodes.html */ /* error return codes */ #define err206 206 #define err206Msg "Partial Content" #define err301 301 #define err301Msg "Moved Permanently" #define err400 400 #define err400Msg "Bad Request" @@ -218,30 +219,33 @@ boolean trackHasData(struct trackDb *tdb); /* check if this is actually a data track: * TRUE when has data, FALSE if has no data * When NO trackDb, can't tell at this point, will check that later */ #define trackHasNoData(tdb) (!trackHasData(tdb)) boolean protectedTrack(char *db, struct trackDb *tdb, char *trackName); /* determine if track is off-limits protected data */ boolean isWiggleDataTable(char *type); /* is this a wiggle data track table */ +char *chrOrAlias(char *db, char *hubUrl); +/* get incoming chr name, may be an alias, return the native chr name */ + /* ######################################################################### */ /* functions in getData.c */ void apiGetData(char *words[MAX_PATH_INFO]); /* 'getData' function, words[1] is the subCommand */ /* ######################################################################### */ /* functions in list.c */ void apiList(char *words[MAX_PATH_INFO]); /* 'list' function words[1] is the subCommand */ /* ######################################################################### */ /* functions in search.c */