src/hg/instinct/bioInt2/bioController.c 1.5
1.5 2009/03/23 18:19:29 jsanborn
updated
Index: src/hg/instinct/bioInt2/bioController.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/instinct/bioInt2/bioController.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -b -B -U 4 -r1.4 -r1.5
--- src/hg/instinct/bioInt2/bioController.c 22 Mar 2009 01:07:28 -0000 1.4
+++ src/hg/instinct/bioInt2/bioController.c 23 Mar 2009 18:19:29 -0000 1.5
@@ -166,8 +166,9 @@
}
void createSetLevelAnalyses(struct sqlConnection *biConn, int cohort_id)
{
+/* Get all gene-level analyses */
char query[256];
safef(query, sizeof(query),
"select * from analyses "
"join analysisModules on analyses.module_id = analysisModules.id "
@@ -214,11 +215,22 @@
char *module = sqlQuickString(biConn, query);
if (sameString(module, "meta"))
+ {
+ ba->pipeline = geneLevelPipeline;
ba->analyze = metaGene;
+ }
+else if (sameString(module, "metaGeneset"))
+ {
+ ba->pipeline = genesetLevelPipeline;
+ ba->analyze = metaGeneset;
+ }
else
+ {
+ ba->pipeline = NULL;
ba->analyze = NULL;
+ }
}
struct biAnalysis *biAnalysisListForCohort(struct sqlConnection *biConn,
char *db, int cohort_id)
@@ -234,30 +246,23 @@
if (!anList)
errAbort("No analyses for cohort = %d", cohort_id);
-struct datasets *da, *daList = datasetsInCohort(biConn, cohort_id);
-
for (an = anList; an; an = an->next)
{
AllocVar(ba);
ba->db = cloneString(db);
ba->tableName = cloneString(an->result_table);
ba->parameters = hashNew(0);
-
- struct slName *slList = NULL;
- for (da = daList; da; da = da->next)
- slNameAddHead(&slList, da->data_table);
- ba->inputTables = slList;
+ ba->inputTables = slNameListFromComma(an->input_tables);
biAnalysisAddModule(biConn, ba, an->module_id);
slAddHead(&baList, ba);
}
slReverse(&baList);
analysesFreeList(&anList);
-datasetsFreeList(&daList);
return baList;
}
@@ -300,9 +305,9 @@
/* Meta-Gene module */
storeAnalysisModule(biConn, "meta", "gene");
/* Set up more modules below, similar to above */
-
+storeAnalysisModule(biConn, "metaGeneset", "set");
}
void prepareDatabase(struct sqlConnection *biConn)
{