src/hg/instinct/bioInt2/bioLevelI.c 1.7
1.7 2009/04/30 19:54:28 jsanborn
added factor graph pipeline and code
Index: src/hg/instinct/bioInt2/bioLevelI.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/instinct/bioInt2/bioLevelI.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -b -B -U 4 -r1.6 -r1.7
--- src/hg/instinct/bioInt2/bioLevelI.c 27 Apr 2009 06:15:48 -0000 1.6
+++ src/hg/instinct/bioInt2/bioLevelI.c 30 Apr 2009 19:54:28 -0000 1.7
@@ -30,30 +30,8 @@
}
fprintf(stdout, "\n");
}
-void analysisResultFree(struct analysisResult **pEl)
-{
-struct analysisResult *el;
-if ((el = *pEl) == NULL) return;
-
-freeMem(el->sample);
-freeMem(el->feature);
-freez(pEl);
-}
-
-void analysisResultFreeList(struct analysisResult **pList)
-{
-struct analysisResult *el, *next;
-
-for (el = *pList; el != NULL; el = next)
- {
- next = el->next;
- analysisResultFree(&el);
- }
-*pList = NULL;
-}
-
int findIdInTable(struct sqlConnection *biConn, char *tableName,
char *idField, char *sField, char *name)
{
if (sqlTableSize(biConn, tableName) == 0) /* brand new table, return 0 */
@@ -149,41 +127,8 @@
return hash;
}
-
-void storeAnalysisResultsInDb(struct sqlConnection *biConn, struct biAnalysis *ba,
- struct analysisResult *arList)
-{
-if (!sqlTableExists(biConn, ba->tableName))
- createAnalysisValsTable(biConn, ba->tableName);
-
-struct hash *featureIds = getAnalysisFeaturesHash(biConn);
-struct hash *sampleIds = createHash(biConn, SA_TABLE, "name", "id");
-
-struct analysisVals *av = AllocA(struct analysisVals);
-struct analysisResult *ar;
-for (ar = arList; ar; ar = ar->next)
- {
- char *sample_id = hashMustFindVal(sampleIds, ar->sample);
- int feature_id = hashIntValDefault(featureIds, ar->feature, -1);
-
- if (!sample_id || feature_id == -1)
- continue;
-
- av->sample_id = atoi(sample_id);
- av->feature_id = feature_id;
- av->val = ar->val;
- av->conf = ar->conf;
-
- analysisValsSaveToDb(biConn, av, ba->tableName, 50);
- }
-
-hashFree(&featureIds);
-freeHashAndVals(&sampleIds);
-analysisValsFree(&av);
-}
-
boolean analysisExists(struct sqlConnection *biConn, struct biAnalysis *ba)
{
if (!sqlTableExists(biConn, ba->tableName))
return FALSE;