src/hg/instinct/bioInt2/bioIntDb.h 1.8
1.8 2009/09/05 01:12:01 sbenz
Added em to pipeline
Index: src/hg/instinct/bioInt2/bioIntDb.h
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/instinct/bioInt2/bioIntDb.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -b -B -U 1000000 -r1.7 -r1.8
--- src/hg/instinct/bioInt2/bioIntDb.h 30 Apr 2009 19:54:28 -0000 1.7
+++ src/hg/instinct/bioInt2/bioIntDb.h 5 Sep 2009 01:12:01 -0000 1.8
@@ -1,1632 +1,1665 @@
/* bioIntDb.h was originally generated by the autoSql program, which also
* generated bioIntDb.c and bioIntDb.sql. This header links the database and
* the RAM representation of objects. */
#ifndef BIOINTDB_H
#define BIOINTDB_H
#include "jksql.h"
#define GENESETS_NUM_COLS 3
struct genesets
/* Pathway List */
{
struct genesets *next; /* Next in singly linked list. */
unsigned id; /* Unique id */
char *name; /* Pathway name */
char *source; /* Pathway Source, i.e. KEGG, BioCarta */
};
void genesetsStaticLoad(char **row, struct genesets *ret);
/* Load a row from genesets table into ret. The contents of ret will
* be replaced at the next call to this function. */
struct genesets *genesetsLoad(char **row);
/* Load a genesets from row fetched with select * from genesets
* from database. Dispose of this with genesetsFree(). */
struct genesets *genesetsLoadAll(char *fileName);
/* Load all genesets from whitespace-separated file.
* Dispose of this with genesetsFreeList(). */
struct genesets *genesetsLoadAllByChar(char *fileName, char chopper);
/* Load all genesets from chopper separated file.
* Dispose of this with genesetsFreeList(). */
#define genesetsLoadAllByTab(a) genesetsLoadAllByChar(a, '\t');
/* Load all genesets from tab separated file.
* Dispose of this with genesetsFreeList(). */
struct genesets *genesetsLoadByQuery(struct sqlConnection *conn, char *query);
/* Load all genesets 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 genesetsFreeList(). */
void genesetsSaveToDb(struct sqlConnection *conn, struct genesets *el, char *tableName, int updateSize);
/* Save genesets as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size
* of a string that would contain the entire query. Arrays of native types are
* converted to comma separated strings and loaded as such, User defined types are
* inserted as NULL. Note that strings must be escaped to allow insertion into the database.
* For example "autosql's features include" --> "autosql\'s features include"
* If worried about this use genesetsSaveToDbEscaped() */
void genesetsSaveToDbEscaped(struct sqlConnection *conn, struct genesets *el, char *tableName, int updateSize);
/* Save genesets as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size.
* of a string that would contain the entire query. Automatically
* escapes all simple strings (not arrays of string) but may be slower than genesetsSaveToDb().
* For example automatically copies and converts:
* "autosql's features include" --> "autosql\'s features include"
* before inserting into database. */
struct genesets *genesetsCommaIn(char **pS, struct genesets *ret);
/* Create a genesets out of a comma separated string.
* This will fill in ret if non-null, otherwise will
* return a new genesets */
void genesetsFree(struct genesets **pEl);
/* Free a single dynamically allocated genesets such as created
* with genesetsLoad(). */
void genesetsFreeList(struct genesets **pList);
/* Free a list of dynamically allocated genesets's */
void genesetsOutput(struct genesets *el, FILE *f, char sep, char lastSep);
/* Print out genesets. Separate fields with sep. Follow last field with lastSep. */
#define genesetsTabOut(el,f) genesetsOutput(el,f,'\t','\n');
/* Print out genesets as a line in a tab-separated file. */
#define genesetsCommaOut(el,f) genesetsOutput(el,f,',',',');
/* Print out genesets as a comma separated list including final comma. */
#define GENESETGENES_NUM_COLS 2
struct genesetGenes
/* Pathway Genes */
{
struct genesetGenes *next; /* Next in singly linked list. */
unsigned id; /* Unique id */
unsigned gene_id; /* Gene id */
};
void genesetGenesStaticLoad(char **row, struct genesetGenes *ret);
/* Load a row from genesetGenes table into ret. The contents of ret will
* be replaced at the next call to this function. */
struct genesetGenes *genesetGenesLoad(char **row);
/* Load a genesetGenes from row fetched with select * from genesetGenes
* from database. Dispose of this with genesetGenesFree(). */
struct genesetGenes *genesetGenesLoadAll(char *fileName);
/* Load all genesetGenes from whitespace-separated file.
* Dispose of this with genesetGenesFreeList(). */
struct genesetGenes *genesetGenesLoadAllByChar(char *fileName, char chopper);
/* Load all genesetGenes from chopper separated file.
* Dispose of this with genesetGenesFreeList(). */
#define genesetGenesLoadAllByTab(a) genesetGenesLoadAllByChar(a, '\t');
/* Load all genesetGenes from tab separated file.
* Dispose of this with genesetGenesFreeList(). */
struct genesetGenes *genesetGenesLoadByQuery(struct sqlConnection *conn, char *query);
/* Load all genesetGenes 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 genesetGenesFreeList(). */
void genesetGenesSaveToDb(struct sqlConnection *conn, struct genesetGenes *el, char *tableName, int updateSize);
/* Save genesetGenes as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size
* of a string that would contain the entire query. Arrays of native types are
* converted to comma separated strings and loaded as such, User defined types are
* inserted as NULL. Note that strings must be escaped to allow insertion into the database.
* For example "autosql's features include" --> "autosql\'s features include"
* If worried about this use genesetGenesSaveToDbEscaped() */
void genesetGenesSaveToDbEscaped(struct sqlConnection *conn, struct genesetGenes *el, char *tableName, int updateSize);
/* Save genesetGenes as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size.
* of a string that would contain the entire query. Automatically
* escapes all simple strings (not arrays of string) but may be slower than genesetGenesSaveToDb().
* For example automatically copies and converts:
* "autosql's features include" --> "autosql\'s features include"
* before inserting into database. */
struct genesetGenes *genesetGenesCommaIn(char **pS, struct genesetGenes *ret);
/* Create a genesetGenes out of a comma separated string.
* This will fill in ret if non-null, otherwise will
* return a new genesetGenes */
void genesetGenesFree(struct genesetGenes **pEl);
/* Free a single dynamically allocated genesetGenes such as created
* with genesetGenesLoad(). */
void genesetGenesFreeList(struct genesetGenes **pList);
/* Free a list of dynamically allocated genesetGenes's */
void genesetGenesOutput(struct genesetGenes *el, FILE *f, char sep, char lastSep);
/* Print out genesetGenes. Separate fields with sep. Follow last field with lastSep. */
#define genesetGenesTabOut(el,f) genesetGenesOutput(el,f,'\t','\n');
/* Print out genesetGenes as a line in a tab-separated file. */
#define genesetGenesCommaOut(el,f) genesetGenesOutput(el,f,',',',');
/* Print out genesetGenes as a comma separated list including final comma. */
#define GENESETINFO_NUM_COLS 2
struct genesetInfo
/* Pathway Information */
{
struct genesetInfo *next; /* Next in singly linked list. */
unsigned id; /* Unique id */
char *description; /* Description of pathway */
};
void genesetInfoStaticLoad(char **row, struct genesetInfo *ret);
/* Load a row from genesetInfo table into ret. The contents of ret will
* be replaced at the next call to this function. */
struct genesetInfo *genesetInfoLoad(char **row);
/* Load a genesetInfo from row fetched with select * from genesetInfo
* from database. Dispose of this with genesetInfoFree(). */
struct genesetInfo *genesetInfoLoadAll(char *fileName);
/* Load all genesetInfo from whitespace-separated file.
* Dispose of this with genesetInfoFreeList(). */
struct genesetInfo *genesetInfoLoadAllByChar(char *fileName, char chopper);
/* Load all genesetInfo from chopper separated file.
* Dispose of this with genesetInfoFreeList(). */
#define genesetInfoLoadAllByTab(a) genesetInfoLoadAllByChar(a, '\t');
/* Load all genesetInfo from tab separated file.
* Dispose of this with genesetInfoFreeList(). */
struct genesetInfo *genesetInfoLoadByQuery(struct sqlConnection *conn, char *query);
/* Load all genesetInfo 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 genesetInfoFreeList(). */
void genesetInfoSaveToDb(struct sqlConnection *conn, struct genesetInfo *el, char *tableName, int updateSize);
/* Save genesetInfo as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size
* of a string that would contain the entire query. Arrays of native types are
* converted to comma separated strings and loaded as such, User defined types are
* inserted as NULL. Note that strings must be escaped to allow insertion into the database.
* For example "autosql's features include" --> "autosql\'s features include"
* If worried about this use genesetInfoSaveToDbEscaped() */
void genesetInfoSaveToDbEscaped(struct sqlConnection *conn, struct genesetInfo *el, char *tableName, int updateSize);
/* Save genesetInfo as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size.
* of a string that would contain the entire query. Automatically
* escapes all simple strings (not arrays of string) but may be slower than genesetInfoSaveToDb().
* For example automatically copies and converts:
* "autosql's features include" --> "autosql\'s features include"
* before inserting into database. */
struct genesetInfo *genesetInfoCommaIn(char **pS, struct genesetInfo *ret);
/* Create a genesetInfo out of a comma separated string.
* This will fill in ret if non-null, otherwise will
* return a new genesetInfo */
void genesetInfoFree(struct genesetInfo **pEl);
/* Free a single dynamically allocated genesetInfo such as created
* with genesetInfoLoad(). */
void genesetInfoFreeList(struct genesetInfo **pList);
/* Free a list of dynamically allocated genesetInfo's */
void genesetInfoOutput(struct genesetInfo *el, FILE *f, char sep, char lastSep);
/* Print out genesetInfo. Separate fields with sep. Follow last field with lastSep. */
#define genesetInfoTabOut(el,f) genesetInfoOutput(el,f,'\t','\n');
/* Print out genesetInfo as a line in a tab-separated file. */
#define genesetInfoCommaOut(el,f) genesetInfoOutput(el,f,',',',');
/* Print out genesetInfo as a comma separated list including final comma. */
#define TISSUES_NUM_COLS 2
struct tissues
/* All available issues */
{
struct tissues *next; /* Next in singly linked list. */
unsigned id; /* Unique id */
char *name; /* Tissue Type */
};
void tissuesStaticLoad(char **row, struct tissues *ret);
/* Load a row from tissues table into ret. The contents of ret will
* be replaced at the next call to this function. */
struct tissues *tissuesLoad(char **row);
/* Load a tissues from row fetched with select * from tissues
* from database. Dispose of this with tissuesFree(). */
struct tissues *tissuesLoadAll(char *fileName);
/* Load all tissues from whitespace-separated file.
* Dispose of this with tissuesFreeList(). */
struct tissues *tissuesLoadAllByChar(char *fileName, char chopper);
/* Load all tissues from chopper separated file.
* Dispose of this with tissuesFreeList(). */
#define tissuesLoadAllByTab(a) tissuesLoadAllByChar(a, '\t');
/* Load all tissues from tab separated file.
* Dispose of this with tissuesFreeList(). */
struct tissues *tissuesLoadByQuery(struct sqlConnection *conn, char *query);
/* Load all tissues 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 tissuesFreeList(). */
void tissuesSaveToDb(struct sqlConnection *conn, struct tissues *el, char *tableName, int updateSize);
/* Save tissues as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size
* of a string that would contain the entire query. Arrays of native types are
* converted to comma separated strings and loaded as such, User defined types are
* inserted as NULL. Note that strings must be escaped to allow insertion into the database.
* For example "autosql's features include" --> "autosql\'s features include"
* If worried about this use tissuesSaveToDbEscaped() */
void tissuesSaveToDbEscaped(struct sqlConnection *conn, struct tissues *el, char *tableName, int updateSize);
/* Save tissues as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size.
* of a string that would contain the entire query. Automatically
* escapes all simple strings (not arrays of string) but may be slower than tissuesSaveToDb().
* For example automatically copies and converts:
* "autosql's features include" --> "autosql\'s features include"
* before inserting into database. */
struct tissues *tissuesCommaIn(char **pS, struct tissues *ret);
/* Create a tissues out of a comma separated string.
* This will fill in ret if non-null, otherwise will
* return a new tissues */
void tissuesFree(struct tissues **pEl);
/* Free a single dynamically allocated tissues such as created
* with tissuesLoad(). */
void tissuesFreeList(struct tissues **pList);
/* Free a list of dynamically allocated tissues's */
void tissuesOutput(struct tissues *el, FILE *f, char sep, char lastSep);
/* Print out tissues. Separate fields with sep. Follow last field with lastSep. */
#define tissuesTabOut(el,f) tissuesOutput(el,f,'\t','\n');
/* Print out tissues as a line in a tab-separated file. */
#define tissuesCommaOut(el,f) tissuesOutput(el,f,',',',');
/* Print out tissues as a comma separated list including final comma. */
#define DATATYPES_NUM_COLS 3
struct dataTypes
/* All available data types */
{
struct dataTypes *next; /* Next in singly linked list. */
unsigned id; /* Unique id */
char *format; /* Data Format */
char *name; /* Data type */
};
void dataTypesStaticLoad(char **row, struct dataTypes *ret);
/* Load a row from dataTypes table into ret. The contents of ret will
* be replaced at the next call to this function. */
struct dataTypes *dataTypesLoad(char **row);
/* Load a dataTypes from row fetched with select * from dataTypes
* from database. Dispose of this with dataTypesFree(). */
struct dataTypes *dataTypesLoadAll(char *fileName);
/* Load all dataTypes from whitespace-separated file.
* Dispose of this with dataTypesFreeList(). */
struct dataTypes *dataTypesLoadAllByChar(char *fileName, char chopper);
/* Load all dataTypes from chopper separated file.
* Dispose of this with dataTypesFreeList(). */
#define dataTypesLoadAllByTab(a) dataTypesLoadAllByChar(a, '\t');
/* Load all dataTypes from tab separated file.
* Dispose of this with dataTypesFreeList(). */
struct dataTypes *dataTypesLoadByQuery(struct sqlConnection *conn, char *query);
/* Load all dataTypes 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 dataTypesFreeList(). */
void dataTypesSaveToDb(struct sqlConnection *conn, struct dataTypes *el, char *tableName, int updateSize);
/* Save dataTypes as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size
* of a string that would contain the entire query. Arrays of native types are
* converted to comma separated strings and loaded as such, User defined types are
* inserted as NULL. Note that strings must be escaped to allow insertion into the database.
* For example "autosql's features include" --> "autosql\'s features include"
* If worried about this use dataTypesSaveToDbEscaped() */
void dataTypesSaveToDbEscaped(struct sqlConnection *conn, struct dataTypes *el, char *tableName, int updateSize);
/* Save dataTypes as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size.
* of a string that would contain the entire query. Automatically
* escapes all simple strings (not arrays of string) but may be slower than dataTypesSaveToDb().
* For example automatically copies and converts:
* "autosql's features include" --> "autosql\'s features include"
* before inserting into database. */
struct dataTypes *dataTypesCommaIn(char **pS, struct dataTypes *ret);
/* Create a dataTypes out of a comma separated string.
* This will fill in ret if non-null, otherwise will
* return a new dataTypes */
void dataTypesFree(struct dataTypes **pEl);
/* Free a single dynamically allocated dataTypes such as created
* with dataTypesLoad(). */
void dataTypesFreeList(struct dataTypes **pList);
/* Free a list of dynamically allocated dataTypes's */
void dataTypesOutput(struct dataTypes *el, FILE *f, char sep, char lastSep);
/* Print out dataTypes. Separate fields with sep. Follow last field with lastSep. */
#define dataTypesTabOut(el,f) dataTypesOutput(el,f,'\t','\n');
/* Print out dataTypes as a line in a tab-separated file. */
#define dataTypesCommaOut(el,f) dataTypesOutput(el,f,',',',');
/* Print out dataTypes as a comma separated list including final comma. */
#define DATASETS_NUM_COLS 6
struct datasets
/* All available datasets */
{
struct datasets *next; /* Next in singly linked list. */
unsigned id; /* Unique Id */
unsigned tissue_id; /* Numeric id denoting tissue type */
unsigned type_id; /* Type of genomics data */
unsigned num_samples; /* Number of samples in study */
char *name; /* Dataset name */
char *data_table; /* Array Data tablename */
};
void datasetsStaticLoad(char **row, struct datasets *ret);
/* Load a row from datasets table into ret. The contents of ret will
* be replaced at the next call to this function. */
struct datasets *datasetsLoad(char **row);
/* Load a datasets from row fetched with select * from datasets
* from database. Dispose of this with datasetsFree(). */
struct datasets *datasetsLoadAll(char *fileName);
/* Load all datasets from whitespace-separated file.
* Dispose of this with datasetsFreeList(). */
struct datasets *datasetsLoadAllByChar(char *fileName, char chopper);
/* Load all datasets from chopper separated file.
* Dispose of this with datasetsFreeList(). */
#define datasetsLoadAllByTab(a) datasetsLoadAllByChar(a, '\t');
/* Load all datasets from tab separated file.
* Dispose of this with datasetsFreeList(). */
struct datasets *datasetsLoadByQuery(struct sqlConnection *conn, char *query);
/* Load all datasets 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 datasetsFreeList(). */
void datasetsSaveToDb(struct sqlConnection *conn, struct datasets *el, char *tableName, int updateSize);
/* Save datasets as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size
* of a string that would contain the entire query. Arrays of native types are
* converted to comma separated strings and loaded as such, User defined types are
* inserted as NULL. Note that strings must be escaped to allow insertion into the database.
* For example "autosql's features include" --> "autosql\'s features include"
* If worried about this use datasetsSaveToDbEscaped() */
void datasetsSaveToDbEscaped(struct sqlConnection *conn, struct datasets *el, char *tableName, int updateSize);
/* Save datasets as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size.
* of a string that would contain the entire query. Automatically
* escapes all simple strings (not arrays of string) but may be slower than datasetsSaveToDb().
* For example automatically copies and converts:
* "autosql's features include" --> "autosql\'s features include"
* before inserting into database. */
struct datasets *datasetsCommaIn(char **pS, struct datasets *ret);
/* Create a datasets out of a comma separated string.
* This will fill in ret if non-null, otherwise will
* return a new datasets */
void datasetsFree(struct datasets **pEl);
/* Free a single dynamically allocated datasets such as created
* with datasetsLoad(). */
void datasetsFreeList(struct datasets **pList);
/* Free a list of dynamically allocated datasets's */
void datasetsOutput(struct datasets *el, FILE *f, char sep, char lastSep);
/* Print out datasets. Separate fields with sep. Follow last field with lastSep. */
#define datasetsTabOut(el,f) datasetsOutput(el,f,'\t','\n');
/* Print out datasets as a line in a tab-separated file. */
#define datasetsCommaOut(el,f) datasetsOutput(el,f,',',',');
/* Print out datasets as a comma separated list including final comma. */
#define COHORTS_NUM_COLS 2
struct cohorts
/* All cohorts */
{
struct cohorts *next; /* Next in singly linked list. */
unsigned id; /* Cohort Id */
char *name; /* Cohort name */
};
void cohortsStaticLoad(char **row, struct cohorts *ret);
/* Load a row from cohorts table into ret. The contents of ret will
* be replaced at the next call to this function. */
struct cohorts *cohortsLoad(char **row);
/* Load a cohorts from row fetched with select * from cohorts
* from database. Dispose of this with cohortsFree(). */
struct cohorts *cohortsLoadAll(char *fileName);
/* Load all cohorts from whitespace-separated file.
* Dispose of this with cohortsFreeList(). */
struct cohorts *cohortsLoadAllByChar(char *fileName, char chopper);
/* Load all cohorts from chopper separated file.
* Dispose of this with cohortsFreeList(). */
#define cohortsLoadAllByTab(a) cohortsLoadAllByChar(a, '\t');
/* Load all cohorts from tab separated file.
* Dispose of this with cohortsFreeList(). */
struct cohorts *cohortsLoadByQuery(struct sqlConnection *conn, char *query);
/* Load all cohorts 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 cohortsFreeList(). */
void cohortsSaveToDb(struct sqlConnection *conn, struct cohorts *el, char *tableName, int updateSize);
/* Save cohorts as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size
* of a string that would contain the entire query. Arrays of native types are
* converted to comma separated strings and loaded as such, User defined types are
* inserted as NULL. Note that strings must be escaped to allow insertion into the database.
* For example "autosql's features include" --> "autosql\'s features include"
* If worried about this use cohortsSaveToDbEscaped() */
void cohortsSaveToDbEscaped(struct sqlConnection *conn, struct cohorts *el, char *tableName, int updateSize);
/* Save cohorts as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size.
* of a string that would contain the entire query. Automatically
* escapes all simple strings (not arrays of string) but may be slower than cohortsSaveToDb().
* For example automatically copies and converts:
* "autosql's features include" --> "autosql\'s features include"
* before inserting into database. */
struct cohorts *cohortsCommaIn(char **pS, struct cohorts *ret);
/* Create a cohorts out of a comma separated string.
* This will fill in ret if non-null, otherwise will
* return a new cohorts */
void cohortsFree(struct cohorts **pEl);
/* Free a single dynamically allocated cohorts such as created
* with cohortsLoad(). */
void cohortsFreeList(struct cohorts **pList);
/* Free a list of dynamically allocated cohorts's */
void cohortsOutput(struct cohorts *el, FILE *f, char sep, char lastSep);
/* Print out cohorts. Separate fields with sep. Follow last field with lastSep. */
#define cohortsTabOut(el,f) cohortsOutput(el,f,'\t','\n');
/* Print out cohorts as a line in a tab-separated file. */
#define cohortsCommaOut(el,f) cohortsOutput(el,f,',',',');
/* Print out cohorts as a comma separated list including final comma. */
#define DATASETCOHORT_NUM_COLS 2
struct datasetCohort
/* Dataset cohort lookup */
{
struct datasetCohort *next; /* Next in singly linked list. */
unsigned dataset_id; /* Dataset Id */
unsigned cohort_id; /* Cohort Id */
};
void datasetCohortStaticLoad(char **row, struct datasetCohort *ret);
/* Load a row from datasetCohort table into ret. The contents of ret will
* be replaced at the next call to this function. */
struct datasetCohort *datasetCohortLoad(char **row);
/* Load a datasetCohort from row fetched with select * from datasetCohort
* from database. Dispose of this with datasetCohortFree(). */
struct datasetCohort *datasetCohortLoadAll(char *fileName);
/* Load all datasetCohort from whitespace-separated file.
* Dispose of this with datasetCohortFreeList(). */
struct datasetCohort *datasetCohortLoadAllByChar(char *fileName, char chopper);
/* Load all datasetCohort from chopper separated file.
* Dispose of this with datasetCohortFreeList(). */
#define datasetCohortLoadAllByTab(a) datasetCohortLoadAllByChar(a, '\t');
/* Load all datasetCohort from tab separated file.
* Dispose of this with datasetCohortFreeList(). */
struct datasetCohort *datasetCohortLoadByQuery(struct sqlConnection *conn, char *query);
/* Load all datasetCohort 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 datasetCohortFreeList(). */
void datasetCohortSaveToDb(struct sqlConnection *conn, struct datasetCohort *el, char *tableName, int updateSize);
/* Save datasetCohort as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size
* of a string that would contain the entire query. Arrays of native types are
* converted to comma separated strings and loaded as such, User defined types are
* inserted as NULL. Note that strings must be escaped to allow insertion into the database.
* For example "autosql's features include" --> "autosql\'s features include"
* If worried about this use datasetCohortSaveToDbEscaped() */
void datasetCohortSaveToDbEscaped(struct sqlConnection *conn, struct datasetCohort *el, char *tableName, int updateSize);
/* Save datasetCohort as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size.
* of a string that would contain the entire query. Automatically
* escapes all simple strings (not arrays of string) but may be slower than datasetCohortSaveToDb().
* For example automatically copies and converts:
* "autosql's features include" --> "autosql\'s features include"
* before inserting into database. */
struct datasetCohort *datasetCohortCommaIn(char **pS, struct datasetCohort *ret);
/* Create a datasetCohort out of a comma separated string.
* This will fill in ret if non-null, otherwise will
* return a new datasetCohort */
void datasetCohortFree(struct datasetCohort **pEl);
/* Free a single dynamically allocated datasetCohort such as created
* with datasetCohortLoad(). */
void datasetCohortFreeList(struct datasetCohort **pList);
/* Free a list of dynamically allocated datasetCohort's */
void datasetCohortOutput(struct datasetCohort *el, FILE *f, char sep, char lastSep);
/* Print out datasetCohort. Separate fields with sep. Follow last field with lastSep. */
#define datasetCohortTabOut(el,f) datasetCohortOutput(el,f,'\t','\n');
/* Print out datasetCohort as a line in a tab-separated file. */
#define datasetCohortCommaOut(el,f) datasetCohortOutput(el,f,',',',');
/* Print out datasetCohort as a comma separated list including final comma. */
#define PROBESAMPLEVAL_NUM_COLS 3
struct probeSampleVal
/* Probe values for single sample */
{
struct probeSampleVal *next; /* Next in singly linked list. */
unsigned probe_id; /* Probe Id */
unsigned sample_id; /* Sample Id */
float val; /* Exp Value */
};
void probeSampleValStaticLoad(char **row, struct probeSampleVal *ret);
/* Load a row from probeSampleVal table into ret. The contents of ret will
* be replaced at the next call to this function. */
struct probeSampleVal *probeSampleValLoad(char **row);
/* Load a probeSampleVal from row fetched with select * from probeSampleVal
* from database. Dispose of this with probeSampleValFree(). */
struct probeSampleVal *probeSampleValLoadAll(char *fileName);
/* Load all probeSampleVal from whitespace-separated file.
* Dispose of this with probeSampleValFreeList(). */
struct probeSampleVal *probeSampleValLoadAllByChar(char *fileName, char chopper);
/* Load all probeSampleVal from chopper separated file.
* Dispose of this with probeSampleValFreeList(). */
#define probeSampleValLoadAllByTab(a) probeSampleValLoadAllByChar(a, '\t');
/* Load all probeSampleVal from tab separated file.
* Dispose of this with probeSampleValFreeList(). */
struct probeSampleVal *probeSampleValLoadByQuery(struct sqlConnection *conn, char *query);
/* Load all probeSampleVal 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 probeSampleValFreeList(). */
void probeSampleValSaveToDb(struct sqlConnection *conn, struct probeSampleVal *el, char *tableName, int updateSize);
/* Save probeSampleVal as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size
* of a string that would contain the entire query. Arrays of native types are
* converted to comma separated strings and loaded as such, User defined types are
* inserted as NULL. Note that strings must be escaped to allow insertion into the database.
* For example "autosql's features include" --> "autosql\'s features include"
* If worried about this use probeSampleValSaveToDbEscaped() */
void probeSampleValSaveToDbEscaped(struct sqlConnection *conn, struct probeSampleVal *el, char *tableName, int updateSize);
/* Save probeSampleVal as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size.
* of a string that would contain the entire query. Automatically
* escapes all simple strings (not arrays of string) but may be slower than probeSampleValSaveToDb().
* For example automatically copies and converts:
* "autosql's features include" --> "autosql\'s features include"
* before inserting into database. */
struct probeSampleVal *probeSampleValCommaIn(char **pS, struct probeSampleVal *ret);
/* Create a probeSampleVal out of a comma separated string.
* This will fill in ret if non-null, otherwise will
* return a new probeSampleVal */
void probeSampleValFree(struct probeSampleVal **pEl);
/* Free a single dynamically allocated probeSampleVal such as created
* with probeSampleValLoad(). */
void probeSampleValFreeList(struct probeSampleVal **pList);
/* Free a list of dynamically allocated probeSampleVal's */
void probeSampleValOutput(struct probeSampleVal *el, FILE *f, char sep, char lastSep);
/* Print out probeSampleVal. Separate fields with sep. Follow last field with lastSep. */
#define probeSampleValTabOut(el,f) probeSampleValOutput(el,f,'\t','\n');
/* Print out probeSampleVal as a line in a tab-separated file. */
#define probeSampleValCommaOut(el,f) probeSampleValOutput(el,f,',',',');
/* Print out probeSampleVal as a comma separated list including final comma. */
#define PROBEVALS_NUM_COLS 3
struct probeVals
/* Probe values for all samples */
{
struct probeVals *next; /* Next in singly linked list. */
unsigned probe_id; /* Probe Id */
unsigned sample_count; /* Sample Count */
float *sample_data; /* Sample Data */
};
struct probeVals *probeValsLoad(char **row);
/* Load a probeVals from row fetched with select * from probeVals
* from database. Dispose of this with probeValsFree(). */
struct probeVals *probeValsLoadAll(char *fileName);
/* Load all probeVals from whitespace-separated file.
* Dispose of this with probeValsFreeList(). */
struct probeVals *probeValsLoadAllByChar(char *fileName, char chopper);
/* Load all probeVals from chopper separated file.
* Dispose of this with probeValsFreeList(). */
#define probeValsLoadAllByTab(a) probeValsLoadAllByChar(a, '\t');
/* Load all probeVals from tab separated file.
* Dispose of this with probeValsFreeList(). */
struct probeVals *probeValsLoadByQuery(struct sqlConnection *conn, char *query);
/* Load all probeVals 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 probeValsFreeList(). */
void probeValsSaveToDb(struct sqlConnection *conn, struct probeVals *el, char *tableName, int updateSize);
/* Save probeVals as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size
* of a string that would contain the entire query. Arrays of native types are
* converted to comma separated strings and loaded as such, User defined types are
* inserted as NULL. Note that strings must be escaped to allow insertion into the database.
* For example "autosql's features include" --> "autosql\'s features include"
* If worried about this use probeValsSaveToDbEscaped() */
void probeValsSaveToDbEscaped(struct sqlConnection *conn, struct probeVals *el, char *tableName, int updateSize);
/* Save probeVals as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size.
* of a string that would contain the entire query. Automatically
* escapes all simple strings (not arrays of string) but may be slower than probeValsSaveToDb().
* For example automatically copies and converts:
* "autosql's features include" --> "autosql\'s features include"
* before inserting into database. */
struct probeVals *probeValsCommaIn(char **pS, struct probeVals *ret);
/* Create a probeVals out of a comma separated string.
* This will fill in ret if non-null, otherwise will
* return a new probeVals */
void probeValsFree(struct probeVals **pEl);
/* Free a single dynamically allocated probeVals such as created
* with probeValsLoad(). */
void probeValsFreeList(struct probeVals **pList);
/* Free a list of dynamically allocated probeVals's */
void probeValsOutput(struct probeVals *el, FILE *f, char sep, char lastSep);
/* Print out probeVals. Separate fields with sep. Follow last field with lastSep. */
#define probeValsTabOut(el,f) probeValsOutput(el,f,'\t','\n');
/* Print out probeVals as a line in a tab-separated file. */
#define probeValsCommaOut(el,f) probeValsOutput(el,f,',',',');
/* Print out probeVals as a comma separated list including final comma. */
#define SAMPLES_NUM_COLS 6
struct samples
/* All sample info */
{
struct samples *next; /* Next in singly linked list. */
unsigned id; /* Unique Id */
char *name; /* Sample Name */
unsigned patient_id; /* Patient Id */
char *patient_name; /* Patient Name */
unsigned dataset_id; /* Dataset Id */
unsigned tissue_id; /* Tissue Type Id */
};
void samplesStaticLoad(char **row, struct samples *ret);
/* Load a row from samples table into ret. The contents of ret will
* be replaced at the next call to this function. */
struct samples *samplesLoad(char **row);
/* Load a samples from row fetched with select * from samples
* from database. Dispose of this with samplesFree(). */
struct samples *samplesLoadAll(char *fileName);
/* Load all samples from whitespace-separated file.
* Dispose of this with samplesFreeList(). */
struct samples *samplesLoadAllByChar(char *fileName, char chopper);
/* Load all samples from chopper separated file.
* Dispose of this with samplesFreeList(). */
#define samplesLoadAllByTab(a) samplesLoadAllByChar(a, '\t');
/* Load all samples from tab separated file.
* Dispose of this with samplesFreeList(). */
struct samples *samplesLoadByQuery(struct sqlConnection *conn, char *query);
/* Load all samples 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 samplesFreeList(). */
void samplesSaveToDb(struct sqlConnection *conn, struct samples *el, char *tableName, int updateSize);
/* Save samples as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size
* of a string that would contain the entire query. Arrays of native types are
* converted to comma separated strings and loaded as such, User defined types are
* inserted as NULL. Note that strings must be escaped to allow insertion into the database.
* For example "autosql's features include" --> "autosql\'s features include"
* If worried about this use samplesSaveToDbEscaped() */
void samplesSaveToDbEscaped(struct sqlConnection *conn, struct samples *el, char *tableName, int updateSize);
/* Save samples as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size.
* of a string that would contain the entire query. Automatically
* escapes all simple strings (not arrays of string) but may be slower than samplesSaveToDb().
* For example automatically copies and converts:
* "autosql's features include" --> "autosql\'s features include"
* before inserting into database. */
struct samples *samplesCommaIn(char **pS, struct samples *ret);
/* Create a samples out of a comma separated string.
* This will fill in ret if non-null, otherwise will
* return a new samples */
void samplesFree(struct samples **pEl);
/* Free a single dynamically allocated samples such as created
* with samplesLoad(). */
void samplesFreeList(struct samples **pList);
/* Free a list of dynamically allocated samples's */
void samplesOutput(struct samples *el, FILE *f, char sep, char lastSep);
/* Print out samples. Separate fields with sep. Follow last field with lastSep. */
#define samplesTabOut(el,f) samplesOutput(el,f,'\t','\n');
/* Print out samples as a line in a tab-separated file. */
#define samplesCommaOut(el,f) samplesOutput(el,f,',',',');
/* Print out samples as a comma separated list including final comma. */
#define FEATURES_NUM_COLS 4
struct features
/* All Features */
{
struct features *next; /* Next in singly linked list. */
unsigned id; /* Unique Id */
char *name; /* Feature Name */
char *shortLabel; /* Short Label */
char *longLabel; /* Long Label */
};
void featuresStaticLoad(char **row, struct features *ret);
/* Load a row from features table into ret. The contents of ret will
* be replaced at the next call to this function. */
struct features *featuresLoad(char **row);
/* Load a features from row fetched with select * from features
* from database. Dispose of this with featuresFree(). */
struct features *featuresLoadAll(char *fileName);
/* Load all features from whitespace-separated file.
* Dispose of this with featuresFreeList(). */
struct features *featuresLoadAllByChar(char *fileName, char chopper);
/* Load all features from chopper separated file.
* Dispose of this with featuresFreeList(). */
#define featuresLoadAllByTab(a) featuresLoadAllByChar(a, '\t');
/* Load all features from tab separated file.
* Dispose of this with featuresFreeList(). */
struct features *featuresLoadByQuery(struct sqlConnection *conn, char *query);
/* Load all features 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 featuresFreeList(). */
void featuresSaveToDb(struct sqlConnection *conn, struct features *el, char *tableName, int updateSize);
/* Save features as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size
* of a string that would contain the entire query. Arrays of native types are
* converted to comma separated strings and loaded as such, User defined types are
* inserted as NULL. Note that strings must be escaped to allow insertion into the database.
* For example "autosql's features include" --> "autosql\'s features include"
* If worried about this use featuresSaveToDbEscaped() */
void featuresSaveToDbEscaped(struct sqlConnection *conn, struct features *el, char *tableName, int updateSize);
/* Save features as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size.
* of a string that would contain the entire query. Automatically
* escapes all simple strings (not arrays of string) but may be slower than featuresSaveToDb().
* For example automatically copies and converts:
* "autosql's features include" --> "autosql\'s features include"
* before inserting into database. */
struct features *featuresCommaIn(char **pS, struct features *ret);
/* Create a features out of a comma separated string.
* This will fill in ret if non-null, otherwise will
* return a new features */
void featuresFree(struct features **pEl);
/* Free a single dynamically allocated features such as created
* with featuresLoad(). */
void featuresFreeList(struct features **pList);
/* Free a list of dynamically allocated features's */
void featuresOutput(struct features *el, FILE *f, char sep, char lastSep);
/* Print out features. Separate fields with sep. Follow last field with lastSep. */
#define featuresTabOut(el,f) featuresOutput(el,f,'\t','\n');
/* Print out features as a line in a tab-separated file. */
#define featuresCommaOut(el,f) featuresOutput(el,f,',',',');
/* Print out features as a comma separated list including final comma. */
#define CLINICALDATA_NUM_COLS 4
struct clinicalData
/* All clinical data */
{
struct clinicalData *next; /* Next in singly linked list. */
unsigned sample_id; /* Sample Id */
unsigned feature_id; /* Feature Id */
double val; /* Value */
char *code; /* Coded Value */
};
void clinicalDataStaticLoad(char **row, struct clinicalData *ret);
/* Load a row from clinicalData table into ret. The contents of ret will
* be replaced at the next call to this function. */
struct clinicalData *clinicalDataLoad(char **row);
/* Load a clinicalData from row fetched with select * from clinicalData
* from database. Dispose of this with clinicalDataFree(). */
struct clinicalData *clinicalDataLoadAll(char *fileName);
/* Load all clinicalData from whitespace-separated file.
* Dispose of this with clinicalDataFreeList(). */
struct clinicalData *clinicalDataLoadAllByChar(char *fileName, char chopper);
/* Load all clinicalData from chopper separated file.
* Dispose of this with clinicalDataFreeList(). */
#define clinicalDataLoadAllByTab(a) clinicalDataLoadAllByChar(a, '\t');
/* Load all clinicalData from tab separated file.
* Dispose of this with clinicalDataFreeList(). */
struct clinicalData *clinicalDataLoadByQuery(struct sqlConnection *conn, char *query);
/* Load all clinicalData 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 clinicalDataFreeList(). */
void clinicalDataSaveToDb(struct sqlConnection *conn, struct clinicalData *el, char *tableName, int updateSize);
/* Save clinicalData as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size
* of a string that would contain the entire query. Arrays of native types are
* converted to comma separated strings and loaded as such, User defined types are
* inserted as NULL. Note that strings must be escaped to allow insertion into the database.
* For example "autosql's features include" --> "autosql\'s features include"
* If worried about this use clinicalDataSaveToDbEscaped() */
void clinicalDataSaveToDbEscaped(struct sqlConnection *conn, struct clinicalData *el, char *tableName, int updateSize);
/* Save clinicalData as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size.
* of a string that would contain the entire query. Automatically
* escapes all simple strings (not arrays of string) but may be slower than clinicalDataSaveToDb().
* For example automatically copies and converts:
* "autosql's features include" --> "autosql\'s features include"
* before inserting into database. */
struct clinicalData *clinicalDataCommaIn(char **pS, struct clinicalData *ret);
/* Create a clinicalData out of a comma separated string.
* This will fill in ret if non-null, otherwise will
* return a new clinicalData */
void clinicalDataFree(struct clinicalData **pEl);
/* Free a single dynamically allocated clinicalData such as created
* with clinicalDataLoad(). */
void clinicalDataFreeList(struct clinicalData **pList);
/* Free a list of dynamically allocated clinicalData's */
void clinicalDataOutput(struct clinicalData *el, FILE *f, char sep, char lastSep);
/* Print out clinicalData. Separate fields with sep. Follow last field with lastSep. */
#define clinicalDataTabOut(el,f) clinicalDataOutput(el,f,'\t','\n');
/* Print out clinicalData as a line in a tab-separated file. */
#define clinicalDataCommaOut(el,f) clinicalDataOutput(el,f,',',',');
/* Print out clinicalData as a comma separated list including final comma. */
#define ANALYSES_NUM_COLS 5
struct analyses
/* All analyses run */
{
struct analyses *next; /* Next in singly linked list. */
unsigned id; /* Analysis id */
unsigned cohort_id; /* Cohort Id */
unsigned module_id; /* Module Id */
char *result_table; /* Table containing result */
char *input_tables; /* Comma-separated list of input tables */
};
void analysesStaticLoad(char **row, struct analyses *ret);
/* Load a row from analyses table into ret. The contents of ret will
* be replaced at the next call to this function. */
struct analyses *analysesLoad(char **row);
/* Load a analyses from row fetched with select * from analyses
* from database. Dispose of this with analysesFree(). */
struct analyses *analysesLoadAll(char *fileName);
/* Load all analyses from whitespace-separated file.
* Dispose of this with analysesFreeList(). */
struct analyses *analysesLoadAllByChar(char *fileName, char chopper);
/* Load all analyses from chopper separated file.
* Dispose of this with analysesFreeList(). */
#define analysesLoadAllByTab(a) analysesLoadAllByChar(a, '\t');
/* Load all analyses from tab separated file.
* Dispose of this with analysesFreeList(). */
struct analyses *analysesLoadByQuery(struct sqlConnection *conn, char *query);
/* Load all analyses 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 analysesFreeList(). */
void analysesSaveToDb(struct sqlConnection *conn, struct analyses *el, char *tableName, int updateSize);
/* Save analyses as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size
* of a string that would contain the entire query. Arrays of native types are
* converted to comma separated strings and loaded as such, User defined types are
* inserted as NULL. Note that strings must be escaped to allow insertion into the database.
* For example "autosql's features include" --> "autosql\'s features include"
* If worried about this use analysesSaveToDbEscaped() */
void analysesSaveToDbEscaped(struct sqlConnection *conn, struct analyses *el, char *tableName, int updateSize);
/* Save analyses as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size.
* of a string that would contain the entire query. Automatically
* escapes all simple strings (not arrays of string) but may be slower than analysesSaveToDb().
* For example automatically copies and converts:
* "autosql's features include" --> "autosql\'s features include"
* before inserting into database. */
struct analyses *analysesCommaIn(char **pS, struct analyses *ret);
/* Create a analyses out of a comma separated string.
* This will fill in ret if non-null, otherwise will
* return a new analyses */
void analysesFree(struct analyses **pEl);
/* Free a single dynamically allocated analyses such as created
* with analysesLoad(). */
void analysesFreeList(struct analyses **pList);
/* Free a list of dynamically allocated analyses's */
void analysesOutput(struct analyses *el, FILE *f, char sep, char lastSep);
/* Print out analyses. Separate fields with sep. Follow last field with lastSep. */
#define analysesTabOut(el,f) analysesOutput(el,f,'\t','\n');
/* Print out analyses as a line in a tab-separated file. */
#define analysesCommaOut(el,f) analysesOutput(el,f,',',',');
/* Print out analyses as a comma separated list including final comma. */
#define ANALYSISMODULES_NUM_COLS 3
struct analysisModules
/* All analysis modules */
{
struct analysisModules *next; /* Next in singly linked list. */
unsigned id; /* Module Id */
char *name; /* Module Name */
char *type; /* Module Type (gene, geneset, etc.) */
};
void analysisModulesStaticLoad(char **row, struct analysisModules *ret);
/* Load a row from analysisModules table into ret. The contents of ret will
* be replaced at the next call to this function. */
struct analysisModules *analysisModulesLoad(char **row);
/* Load a analysisModules from row fetched with select * from analysisModules
* from database. Dispose of this with analysisModulesFree(). */
struct analysisModules *analysisModulesLoadAll(char *fileName);
/* Load all analysisModules from whitespace-separated file.
* Dispose of this with analysisModulesFreeList(). */
struct analysisModules *analysisModulesLoadAllByChar(char *fileName, char chopper);
/* Load all analysisModules from chopper separated file.
* Dispose of this with analysisModulesFreeList(). */
#define analysisModulesLoadAllByTab(a) analysisModulesLoadAllByChar(a, '\t');
/* Load all analysisModules from tab separated file.
* Dispose of this with analysisModulesFreeList(). */
struct analysisModules *analysisModulesLoadByQuery(struct sqlConnection *conn, char *query);
/* Load all analysisModules 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 analysisModulesFreeList(). */
void analysisModulesSaveToDb(struct sqlConnection *conn, struct analysisModules *el, char *tableName, int updateSize);
/* Save analysisModules as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size
* of a string that would contain the entire query. Arrays of native types are
* converted to comma separated strings and loaded as such, User defined types are
* inserted as NULL. Note that strings must be escaped to allow insertion into the database.
* For example "autosql's features include" --> "autosql\'s features include"
* If worried about this use analysisModulesSaveToDbEscaped() */
void analysisModulesSaveToDbEscaped(struct sqlConnection *conn, struct analysisModules *el, char *tableName, int updateSize);
/* Save analysisModules as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size.
* of a string that would contain the entire query. Automatically
* escapes all simple strings (not arrays of string) but may be slower than analysisModulesSaveToDb().
* For example automatically copies and converts:
* "autosql's features include" --> "autosql\'s features include"
* before inserting into database. */
struct analysisModules *analysisModulesCommaIn(char **pS, struct analysisModules *ret);
/* Create a analysisModules out of a comma separated string.
* This will fill in ret if non-null, otherwise will
* return a new analysisModules */
void analysisModulesFree(struct analysisModules **pEl);
/* Free a single dynamically allocated analysisModules such as created
* with analysisModulesLoad(). */
void analysisModulesFreeList(struct analysisModules **pList);
/* Free a list of dynamically allocated analysisModules's */
void analysisModulesOutput(struct analysisModules *el, FILE *f, char sep, char lastSep);
/* Print out analysisModules. Separate fields with sep. Follow last field with lastSep. */
#define analysisModulesTabOut(el,f) analysisModulesOutput(el,f,'\t','\n');
/* Print out analysisModules as a line in a tab-separated file. */
#define analysisModulesCommaOut(el,f) analysisModulesOutput(el,f,',',',');
/* Print out analysisModules as a comma separated list including final comma. */
#define ANALYSISPARAMS_NUM_COLS 3
struct analysisParams
/* All analysis parameters */
{
struct analysisParams *next; /* Next in singly linked list. */
unsigned analysis_id; /* Analysis Id */
char *name; /* Parameter name */
char *val; /* Parameter val */
};
void analysisParamsStaticLoad(char **row, struct analysisParams *ret);
/* Load a row from analysisParams table into ret. The contents of ret will
* be replaced at the next call to this function. */
struct analysisParams *analysisParamsLoad(char **row);
/* Load a analysisParams from row fetched with select * from analysisParams
* from database. Dispose of this with analysisParamsFree(). */
struct analysisParams *analysisParamsLoadAll(char *fileName);
/* Load all analysisParams from whitespace-separated file.
* Dispose of this with analysisParamsFreeList(). */
struct analysisParams *analysisParamsLoadAllByChar(char *fileName, char chopper);
/* Load all analysisParams from chopper separated file.
* Dispose of this with analysisParamsFreeList(). */
#define analysisParamsLoadAllByTab(a) analysisParamsLoadAllByChar(a, '\t');
/* Load all analysisParams from tab separated file.
* Dispose of this with analysisParamsFreeList(). */
struct analysisParams *analysisParamsLoadByQuery(struct sqlConnection *conn, char *query);
/* Load all analysisParams 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 analysisParamsFreeList(). */
void analysisParamsSaveToDb(struct sqlConnection *conn, struct analysisParams *el, char *tableName, int updateSize);
/* Save analysisParams as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size
* of a string that would contain the entire query. Arrays of native types are
* converted to comma separated strings and loaded as such, User defined types are
* inserted as NULL. Note that strings must be escaped to allow insertion into the database.
* For example "autosql's features include" --> "autosql\'s features include"
* If worried about this use analysisParamsSaveToDbEscaped() */
void analysisParamsSaveToDbEscaped(struct sqlConnection *conn, struct analysisParams *el, char *tableName, int updateSize);
/* Save analysisParams as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size.
* of a string that would contain the entire query. Automatically
* escapes all simple strings (not arrays of string) but may be slower than analysisParamsSaveToDb().
* For example automatically copies and converts:
* "autosql's features include" --> "autosql\'s features include"
* before inserting into database. */
struct analysisParams *analysisParamsCommaIn(char **pS, struct analysisParams *ret);
/* Create a analysisParams out of a comma separated string.
* This will fill in ret if non-null, otherwise will
* return a new analysisParams */
void analysisParamsFree(struct analysisParams **pEl);
/* Free a single dynamically allocated analysisParams such as created
* with analysisParamsLoad(). */
void analysisParamsFreeList(struct analysisParams **pList);
/* Free a list of dynamically allocated analysisParams's */
void analysisParamsOutput(struct analysisParams *el, FILE *f, char sep, char lastSep);
/* Print out analysisParams. Separate fields with sep. Follow last field with lastSep. */
#define analysisParamsTabOut(el,f) analysisParamsOutput(el,f,'\t','\n');
/* Print out analysisParams as a line in a tab-separated file. */
#define analysisParamsCommaOut(el,f) analysisParamsOutput(el,f,',',',');
/* Print out analysisParams as a comma separated list including final comma. */
#define ANALYSISFEATURES_NUM_COLS 3
struct analysisFeatures
/* All analysis features */
{
struct analysisFeatures *next; /* Next in singly linked list. */
unsigned id; /* Feature Id */
char *feature_name; /* Feature Name */
char *type; /* Feature Type */
};
void analysisFeaturesStaticLoad(char **row, struct analysisFeatures *ret);
/* Load a row from analysisFeatures table into ret. The contents of ret will
* be replaced at the next call to this function. */
struct analysisFeatures *analysisFeaturesLoad(char **row);
/* Load a analysisFeatures from row fetched with select * from analysisFeatures
* from database. Dispose of this with analysisFeaturesFree(). */
struct analysisFeatures *analysisFeaturesLoadAll(char *fileName);
/* Load all analysisFeatures from whitespace-separated file.
* Dispose of this with analysisFeaturesFreeList(). */
struct analysisFeatures *analysisFeaturesLoadAllByChar(char *fileName, char chopper);
/* Load all analysisFeatures from chopper separated file.
* Dispose of this with analysisFeaturesFreeList(). */
#define analysisFeaturesLoadAllByTab(a) analysisFeaturesLoadAllByChar(a, '\t');
/* Load all analysisFeatures from tab separated file.
* Dispose of this with analysisFeaturesFreeList(). */
struct analysisFeatures *analysisFeaturesLoadByQuery(struct sqlConnection *conn, char *query);
/* Load all analysisFeatures 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 analysisFeaturesFreeList(). */
void analysisFeaturesSaveToDb(struct sqlConnection *conn, struct analysisFeatures *el, char *tableName, int updateSize);
/* Save analysisFeatures as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size
* of a string that would contain the entire query. Arrays of native types are
* converted to comma separated strings and loaded as such, User defined types are
* inserted as NULL. Note that strings must be escaped to allow insertion into the database.
* For example "autosql's features include" --> "autosql\'s features include"
* If worried about this use analysisFeaturesSaveToDbEscaped() */
void analysisFeaturesSaveToDbEscaped(struct sqlConnection *conn, struct analysisFeatures *el, char *tableName, int updateSize);
/* Save analysisFeatures as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size.
* of a string that would contain the entire query. Automatically
* escapes all simple strings (not arrays of string) but may be slower than analysisFeaturesSaveToDb().
* For example automatically copies and converts:
* "autosql's features include" --> "autosql\'s features include"
* before inserting into database. */
struct analysisFeatures *analysisFeaturesCommaIn(char **pS, struct analysisFeatures *ret);
/* Create a analysisFeatures out of a comma separated string.
* This will fill in ret if non-null, otherwise will
* return a new analysisFeatures */
void analysisFeaturesFree(struct analysisFeatures **pEl);
/* Free a single dynamically allocated analysisFeatures such as created
* with analysisFeaturesLoad(). */
void analysisFeaturesFreeList(struct analysisFeatures **pList);
/* Free a list of dynamically allocated analysisFeatures's */
void analysisFeaturesOutput(struct analysisFeatures *el, FILE *f, char sep, char lastSep);
/* Print out analysisFeatures. Separate fields with sep. Follow last field with lastSep. */
#define analysisFeaturesTabOut(el,f) analysisFeaturesOutput(el,f,'\t','\n');
/* Print out analysisFeatures as a line in a tab-separated file. */
#define analysisFeaturesCommaOut(el,f) analysisFeaturesOutput(el,f,',',',');
/* Print out analysisFeatures as a comma separated list including final comma. */
#define ANALYSISVALS_NUM_COLS 4
struct analysisVals
/* All analysis vals */
{
struct analysisVals *next; /* Next in singly linked list. */
unsigned sample_id; /* Sample Id */
unsigned feature_id; /* Analysis Feature Id */
float val; /* Val */
float conf; /* Confidence */
};
void analysisValsStaticLoad(char **row, struct analysisVals *ret);
/* Load a row from analysisVals table into ret. The contents of ret will
* be replaced at the next call to this function. */
struct analysisVals *analysisValsLoad(char **row);
/* Load a analysisVals from row fetched with select * from analysisVals
* from database. Dispose of this with analysisValsFree(). */
struct analysisVals *analysisValsLoadAll(char *fileName);
/* Load all analysisVals from whitespace-separated file.
* Dispose of this with analysisValsFreeList(). */
struct analysisVals *analysisValsLoadAllByChar(char *fileName, char chopper);
/* Load all analysisVals from chopper separated file.
* Dispose of this with analysisValsFreeList(). */
#define analysisValsLoadAllByTab(a) analysisValsLoadAllByChar(a, '\t');
/* Load all analysisVals from tab separated file.
* Dispose of this with analysisValsFreeList(). */
struct analysisVals *analysisValsLoadByQuery(struct sqlConnection *conn, char *query);
/* Load all analysisVals 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 analysisValsFreeList(). */
void analysisValsSaveToDb(struct sqlConnection *conn, struct analysisVals *el, char *tableName, int updateSize);
/* Save analysisVals as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size
* of a string that would contain the entire query. Arrays of native types are
* converted to comma separated strings and loaded as such, User defined types are
* inserted as NULL. Note that strings must be escaped to allow insertion into the database.
* For example "autosql's features include" --> "autosql\'s features include"
* If worried about this use analysisValsSaveToDbEscaped() */
void analysisValsSaveToDbEscaped(struct sqlConnection *conn, struct analysisVals *el, char *tableName, int updateSize);
/* Save analysisVals as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size.
* of a string that would contain the entire query. Automatically
* escapes all simple strings (not arrays of string) but may be slower than analysisValsSaveToDb().
* For example automatically copies and converts:
* "autosql's features include" --> "autosql\'s features include"
* before inserting into database. */
struct analysisVals *analysisValsCommaIn(char **pS, struct analysisVals *ret);
/* Create a analysisVals out of a comma separated string.
* This will fill in ret if non-null, otherwise will
* return a new analysisVals */
void analysisValsFree(struct analysisVals **pEl);
/* Free a single dynamically allocated analysisVals such as created
* with analysisValsLoad(). */
void analysisValsFreeList(struct analysisVals **pList);
/* Free a list of dynamically allocated analysisVals's */
void analysisValsOutput(struct analysisVals *el, FILE *f, char sep, char lastSep);
/* Print out analysisVals. Separate fields with sep. Follow last field with lastSep. */
#define analysisValsTabOut(el,f) analysisValsOutput(el,f,'\t','\n');
/* Print out analysisVals as a line in a tab-separated file. */
#define analysisValsCommaOut(el,f) analysisValsOutput(el,f,',',',');
/* Print out analysisVals as a comma separated list including final comma. */
#define PATHWAYVALS_NUM_COLS 5
struct pathwayVals
/* All pathway vals */
{
struct pathwayVals *next; /* Next in singly linked list. */
unsigned pathway_id; /* Pathway Id */
unsigned sample_id; /* Sample Id */
unsigned feature_id; /* Analysis Feature Id */
float val; /* Val */
float conf; /* Confidence */
};
void pathwayValsStaticLoad(char **row, struct pathwayVals *ret);
/* Load a row from pathwayVals table into ret. The contents of ret will
* be replaced at the next call to this function. */
struct pathwayVals *pathwayValsLoad(char **row);
/* Load a pathwayVals from row fetched with select * from pathwayVals
* from database. Dispose of this with pathwayValsFree(). */
struct pathwayVals *pathwayValsLoadAll(char *fileName);
/* Load all pathwayVals from whitespace-separated file.
* Dispose of this with pathwayValsFreeList(). */
struct pathwayVals *pathwayValsLoadAllByChar(char *fileName, char chopper);
/* Load all pathwayVals from chopper separated file.
* Dispose of this with pathwayValsFreeList(). */
#define pathwayValsLoadAllByTab(a) pathwayValsLoadAllByChar(a, '\t');
/* Load all pathwayVals from tab separated file.
* Dispose of this with pathwayValsFreeList(). */
struct pathwayVals *pathwayValsLoadByQuery(struct sqlConnection *conn, char *query);
/* Load all pathwayVals 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 pathwayValsFreeList(). */
void pathwayValsSaveToDb(struct sqlConnection *conn, struct pathwayVals *el, char *tableName, int updateSize);
/* Save pathwayVals as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size
* of a string that would contain the entire query. Arrays of native types are
* converted to comma separated strings and loaded as such, User defined types are
* inserted as NULL. Note that strings must be escaped to allow insertion into the database.
* For example "autosql's features include" --> "autosql\'s features include"
* If worried about this use pathwayValsSaveToDbEscaped() */
void pathwayValsSaveToDbEscaped(struct sqlConnection *conn, struct pathwayVals *el, char *tableName, int updateSize);
/* Save pathwayVals as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size.
* of a string that would contain the entire query. Automatically
* escapes all simple strings (not arrays of string) but may be slower than pathwayValsSaveToDb().
* For example automatically copies and converts:
* "autosql's features include" --> "autosql\'s features include"
* before inserting into database. */
struct pathwayVals *pathwayValsCommaIn(char **pS, struct pathwayVals *ret);
/* Create a pathwayVals out of a comma separated string.
* This will fill in ret if non-null, otherwise will
* return a new pathwayVals */
void pathwayValsFree(struct pathwayVals **pEl);
/* Free a single dynamically allocated pathwayVals such as created
* with pathwayValsLoad(). */
void pathwayValsFreeList(struct pathwayVals **pList);
/* Free a list of dynamically allocated pathwayVals's */
void pathwayValsOutput(struct pathwayVals *el, FILE *f, char sep, char lastSep);
/* Print out pathwayVals. Separate fields with sep. Follow last field with lastSep. */
#define pathwayValsTabOut(el,f) pathwayValsOutput(el,f,'\t','\n');
/* Print out pathwayVals as a line in a tab-separated file. */
#define pathwayValsCommaOut(el,f) pathwayValsOutput(el,f,',',',');
/* Print out pathwayVals as a comma separated list including final comma. */
#define COHORTCORR_NUM_COLS 2
struct cohortCorr
/* Cohort Correlation tables */
{
struct cohortCorr *next; /* Next in singly linked list. */
unsigned cohort_id; /* Cohort Id */
char *result_table; /* Result Table */
};
void cohortCorrStaticLoad(char **row, struct cohortCorr *ret);
/* Load a row from cohortCorr table into ret. The contents of ret will
* be replaced at the next call to this function. */
struct cohortCorr *cohortCorrLoad(char **row);
/* Load a cohortCorr from row fetched with select * from cohortCorr
* from database. Dispose of this with cohortCorrFree(). */
struct cohortCorr *cohortCorrLoadAll(char *fileName);
/* Load all cohortCorr from whitespace-separated file.
* Dispose of this with cohortCorrFreeList(). */
struct cohortCorr *cohortCorrLoadAllByChar(char *fileName, char chopper);
/* Load all cohortCorr from chopper separated file.
* Dispose of this with cohortCorrFreeList(). */
#define cohortCorrLoadAllByTab(a) cohortCorrLoadAllByChar(a, '\t');
/* Load all cohortCorr from tab separated file.
* Dispose of this with cohortCorrFreeList(). */
struct cohortCorr *cohortCorrLoadByQuery(struct sqlConnection *conn, char *query);
/* Load all cohortCorr 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 cohortCorrFreeList(). */
void cohortCorrSaveToDb(struct sqlConnection *conn, struct cohortCorr *el, char *tableName, int updateSize);
/* Save cohortCorr as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size
* of a string that would contain the entire query. Arrays of native types are
* converted to comma separated strings and loaded as such, User defined types are
* inserted as NULL. Note that strings must be escaped to allow insertion into the database.
* For example "autosql's features include" --> "autosql\'s features include"
* If worried about this use cohortCorrSaveToDbEscaped() */
void cohortCorrSaveToDbEscaped(struct sqlConnection *conn, struct cohortCorr *el, char *tableName, int updateSize);
/* Save cohortCorr as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size.
* of a string that would contain the entire query. Automatically
* escapes all simple strings (not arrays of string) but may be slower than cohortCorrSaveToDb().
* For example automatically copies and converts:
* "autosql's features include" --> "autosql\'s features include"
* before inserting into database. */
struct cohortCorr *cohortCorrCommaIn(char **pS, struct cohortCorr *ret);
/* Create a cohortCorr out of a comma separated string.
* This will fill in ret if non-null, otherwise will
* return a new cohortCorr */
void cohortCorrFree(struct cohortCorr **pEl);
/* Free a single dynamically allocated cohortCorr such as created
* with cohortCorrLoad(). */
void cohortCorrFreeList(struct cohortCorr **pList);
/* Free a list of dynamically allocated cohortCorr's */
void cohortCorrOutput(struct cohortCorr *el, FILE *f, char sep, char lastSep);
/* Print out cohortCorr. Separate fields with sep. Follow last field with lastSep. */
#define cohortCorrTabOut(el,f) cohortCorrOutput(el,f,'\t','\n');
/* Print out cohortCorr as a line in a tab-separated file. */
#define cohortCorrCommaOut(el,f) cohortCorrOutput(el,f,',',',');
/* Print out cohortCorr as a comma separated list including final comma. */
#define CORRRESULTS_NUM_COLS 3
struct corrResults
/* Correlation results */
{
struct corrResults *next; /* Next in singly linked list. */
unsigned feature_id1; /* Feature Id1 */
unsigned feature_id2; /* Feature Id2 */
float val; /* Correlation Value */
};
void corrResultsStaticLoad(char **row, struct corrResults *ret);
/* Load a row from corrResults table into ret. The contents of ret will
* be replaced at the next call to this function. */
struct corrResults *corrResultsLoad(char **row);
/* Load a corrResults from row fetched with select * from corrResults
* from database. Dispose of this with corrResultsFree(). */
struct corrResults *corrResultsLoadAll(char *fileName);
/* Load all corrResults from whitespace-separated file.
* Dispose of this with corrResultsFreeList(). */
struct corrResults *corrResultsLoadAllByChar(char *fileName, char chopper);
/* Load all corrResults from chopper separated file.
* Dispose of this with corrResultsFreeList(). */
#define corrResultsLoadAllByTab(a) corrResultsLoadAllByChar(a, '\t');
/* Load all corrResults from tab separated file.
* Dispose of this with corrResultsFreeList(). */
struct corrResults *corrResultsLoadByQuery(struct sqlConnection *conn, char *query);
/* Load all corrResults 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 corrResultsFreeList(). */
void corrResultsSaveToDb(struct sqlConnection *conn, struct corrResults *el, char *tableName, int updateSize);
/* Save corrResults as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size
* of a string that would contain the entire query. Arrays of native types are
* converted to comma separated strings and loaded as such, User defined types are
* inserted as NULL. Note that strings must be escaped to allow insertion into the database.
* For example "autosql's features include" --> "autosql\'s features include"
* If worried about this use corrResultsSaveToDbEscaped() */
void corrResultsSaveToDbEscaped(struct sqlConnection *conn, struct corrResults *el, char *tableName, int updateSize);
/* Save corrResults as a row to the table specified by tableName.
* As blob fields may be arbitrary size updateSize specifies the approx size.
* of a string that would contain the entire query. Automatically
* escapes all simple strings (not arrays of string) but may be slower than corrResultsSaveToDb().
* For example automatically copies and converts:
* "autosql's features include" --> "autosql\'s features include"
* before inserting into database. */
struct corrResults *corrResultsCommaIn(char **pS, struct corrResults *ret);
/* Create a corrResults out of a comma separated string.
* This will fill in ret if non-null, otherwise will
* return a new corrResults */
void corrResultsFree(struct corrResults **pEl);
/* Free a single dynamically allocated corrResults such as created
* with corrResultsLoad(). */
void corrResultsFreeList(struct corrResults **pList);
/* Free a list of dynamically allocated corrResults's */
void corrResultsOutput(struct corrResults *el, FILE *f, char sep, char lastSep);
/* Print out corrResults. Separate fields with sep. Follow last field with lastSep. */
#define corrResultsTabOut(el,f) corrResultsOutput(el,f,'\t','\n');
/* Print out corrResults as a line in a tab-separated file. */
#define corrResultsCommaOut(el,f) corrResultsOutput(el,f,',',',');
/* Print out corrResults as a comma separated list including final comma. */
+
+#define PATHWAYEMPARAMS_NUM_COLS 6
+
+struct pathwayEMParams
+/* All available datasets */
+ {
+ struct pathwayEMParams *next; /* Next in singly linked list. */
+ unsigned pathway_id; /* Id of the pathway this is for */
+ unsigned cohort_id; /* Id of the cohort this is for */
+ unsigned dataset_id; /* Id of the dataset this is for */
+ unsigned parent_state; /* State of the parent node (0-2 right now) */
+ unsigned child_state; /* State of the child node (0-2 right now) */
+ float val; /* Value */
+ };
+
+struct pathwayEMParams *pathwayEMParamsLoad(char **row);
+/* Load a pathwayEMParams from row fetched with select * from pathwayEMParams
+ * from database. Dispose of this with pathwayEMParamsFree(). */
+
+struct pathwayEMParams *pathwayEMParamsLoadByQuery(struct sqlConnection *conn, char *query);
+/* Load all pathwayEMParams 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 pathwayEMParamsFreeList(). */
+
+void pathwayEMParamsFree(struct pathwayEMParams **pEl);
+/* Free a single dynamically allocated pathwayEMParams such as created
+ * with pathwayEMParamsLoad(). */
+
+void pathwayEMParamsFreeList(struct pathwayEMParams **pList);
+/* Free a list of dynamically allocated pathwayEMParams's */
+
/* -------------------------------- End autoSql Generated Code -------------------------------- */
#endif /* BIOINTDB_H */