src/hg/instinct/bioInt2/makeClusterFiles.c 1.6
1.6 2010/01/17 19:42:59 sbenz
Added some stuff dealing with pathways with no values, which was causing a seg fault
Index: src/hg/instinct/bioInt2/makeClusterFiles.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/instinct/bioInt2/makeClusterFiles.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -b -B -U 4 -r1.5 -r1.6
--- src/hg/instinct/bioInt2/makeClusterFiles.c 22 Dec 2009 14:37:44 -0000 1.5
+++ src/hg/instinct/bioInt2/makeClusterFiles.c 17 Jan 2010 19:42:59 -0000 1.6
@@ -299,8 +299,10 @@
if (!pd->entities || !pd->links)
return FALSE;
if (!thList)
return FALSE;
+if(!pd->data)
+ return FALSE;
int numTypes = slCount(thList);
FILE** evidFiles;
AllocArray(evidFiles, numTypes);
@@ -631,9 +633,9 @@
struct dataTuple *dtList = NULL;
if (sameString(nullType, "allData"))
{
dtList = getAllDataTuples(biConn, featureHash, spData, numDataTypes);
- fprintf(stderr, "hashing data tuples...\n");
+ fprintf(stderr, "hashing all data tuples...\n");
dtHash = hashDataTuples(dtList);
}
else if (sameString(nullType, "withinPathway"))
{/* set dtList on each invofaction below*/}
@@ -650,9 +652,14 @@
if (sameString(nullType, "withinPathway"))
{
dtList = getPathwayDataTuples(biConn, featureHash, spData, pa,
numDataTypes);
- fprintf(stderr, "hashing data tuples...\n");
+ if(slCount(dtList) == 0)
+ {
+ fprintf(stderr, "no data tuples found, skipping...\n");
+ continue;
+ }
+ fprintf(stderr, "hashing pathway data tuples...\n");
dtHash = hashDataTuples(dtList);
}
fprintf(stderr, "prepping pathway %s:\n", pa->name);