src/hg/instinct/bioInt2/bioController.c 1.9

1.9 2009/04/30 19:54:28 jsanborn
added factor graph pipeline and code
Index: src/hg/instinct/bioInt2/bioController.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/instinct/bioInt2/bioController.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -b -B -U 4 -r1.8 -r1.9
--- src/hg/instinct/bioInt2/bioController.c	27 Apr 2009 06:15:48 -0000	1.8
+++ src/hg/instinct/bioInt2/bioController.c	30 Apr 2009 19:54:28 -0000	1.9
@@ -282,16 +282,20 @@
 if (sameString(am->type, "gene"))
     ba->pipeline = geneLevelPipeline;
 else if (sameString(am->type, "set"))
     ba->pipeline = genesetLevelPipeline;
+else if (sameString(am->type, "pathway"))
+    ba->pipeline = pathwayLevelPipeline;
 else
     ba->pipeline = NULL;
 
 /* Set analysis algorithm by module name*/
 if (sameString(am->name, "meta"))
     ba->analyze = metaGene;
 else if (sameString(am->name, "metaGeneset"))
     ba->analyze = metaGeneset;
+else if (sameString(am->name, "factorGraph"))
+    ba->analyze = factorGraph;
 else
     ba->analyze = NULL;
 }
 
@@ -369,10 +373,15 @@
 {
 /* Meta-Gene module */
 storeAnalysisModule(biConn, "meta", "gene");
 
-/* Set up more modules below, similar to above */
+/* Meta-geneset module */
 storeAnalysisModule(biConn, "metaGeneset", "set");
+
+/* Pathway Factor Graph module */
+storeAnalysisModule(biConn, "factorGraph", "pathway");
+
+/* Set up more modules below, similar to above */
 }
 
 void createStandardPipeline(struct sqlConnection *biConn, int cohort_id)
 {
@@ -412,8 +421,20 @@
 struct analyses *set = createAnalyses(biConn, cohort_id, am, gene_result_table, params);
 analysesFree(&set);
 analysisModulesFree(&am);
 hashFree(&params);
+
+/* Set factor graph analysis modules */
+am = analysisModulesMatching(biConn, "name", "factorGraph");
+if (!am)
+    errAbort("No analysis module named factorGraph");
+
+params = hashNew(0);
+hashAdd(params, "fxn", cloneString("factorGraphDAI"));
+struct analyses *fg = createAnalyses(biConn, cohort_id, am, input_tables, params);
+analysesFree(&fg);
+analysisModulesFree(&am);
+hashFree(&params);
 }
 
 
 void prepareDatabase(struct sqlConnection *biConn)