8b49d2145ae719c3b3577de7956f7b9131c385ba angie Wed Jan 7 09:43:45 2015 -0800 Libified code from hgVai/libifyMe.c to lib/hAnno.c in anticipationof sharing code with hgAi. Also added hAnnoGetAutoSqlForTdb for hgAi. diff --git src/hg/inc/hAnno.h src/hg/inc/hAnno.h new file mode 100644 index 0000000..2358ddf --- /dev/null +++ src/hg/inc/hAnno.h @@ -0,0 +1,31 @@ +/* hAnno -- helpers for creating anno{Streamers,Grators,Formatters,Queries} */ + +#ifndef HANNO_H +#define HANNO_H + +#include "annoGrator.h" +#include "jksql.h" +#include "trackDb.h" + +struct annoAssembly *hAnnoGetAssembly(char *db); +/* Make annoAssembly for db. */ + +struct annoStreamer *hAnnoStreamerFromTrackDb(struct annoAssembly *assembly, char *selTable, + struct trackDb *tdb, char *chrom, int maxOutRows); +/* Figure out the source and type of data and make an annoStreamer. */ + +struct annoGrator *hAnnoGratorFromBigFileUrl(char *fileOrUrl, struct annoAssembly *assembly, + int maxOutRows, enum annoGratorOverlap overlapRule); +/* Determine what kind of big data file/url we have, make an annoStreamer & in annoGrator. */ + +struct annoGrator *hAnnoGratorFromTrackDb(struct annoAssembly *assembly, char *selTable, + struct trackDb *tdb, char *chrom, int maxOutRows, + struct asObject *primaryAsObj, + enum annoGratorOverlap overlapRule); +/* Figure out the source and type of data, make an annoStreamer & wrap in annoGrator. + * If not NULL, primaryAsObj is used to determine whether we can make an annoGratorGpVar. */ + +struct asObject *hAnnoGetAutoSqlForTdb(char *db, char *chrom, struct trackDb *tdb); +/* If possible, return the asObj that a streamer for this track would use, otherwise NULL. */ + +#endif // HANNO_H