7460f8b77f30387b332655cd1579ced133d9cd03 kent Fri Dec 18 16:31:46 2020 -0800 Fixing bug where a trimmed out graph could linger and cause problems. diff --git src/hg/txGraph/txBedToGraph/txBedToGraph.c src/hg/txGraph/txBedToGraph/txBedToGraph.c index c80aa9a..0500697 100644 --- src/hg/txGraph/txBedToGraph/txBedToGraph.c +++ src/hg/txGraph/txBedToGraph/txBedToGraph.c @@ -292,30 +292,31 @@ * The interval 0 to strandSizeLimit needs to encompass all the * exons. */ { struct lbCluster *clusterList = clusterOneStrand(lbList, strandSizeLimit); struct lbCluster *cluster, *nextCluster; struct txGraph *graphList = NULL; for (cluster = clusterList; cluster != NULL; cluster = nextCluster) { char name[128]; static int id=0; nextCluster = cluster->next; safef(name, sizeof(name), "%s%d", prefix, ++id); verbose(2, "Got cluster of %d called %s.\n", slCount(cluster->lbList), name); struct txGraph *graph = makeGraph(cluster->lbList, maxBleedOver, maxUncheckedBleed, seqCache, singleExonMaxOverlap, name); + if (graph != NULL) slAddHead(&graphList, graph); lbClusterFree(&cluster); } slReverse(&graphList); return graphList; } void txBedToGraph(char *outGraph, char **inPairs, int inCount) /* txBedToGraph - Cluster together beds from txPslToBed. Make transcript graphs out of clusters.. */ { /* Load all bed files and wrap them in sourcedBeds. */ struct linkedBeds *lbList = NULL; int i; for (i=0; i<inCount; ++i) {