3239bc0d88a462d4ca4c81940a9353bdc9e78ce8 braney Tue Apr 3 18:23:27 2012 -0700 start on genepred / variant annoGrator. #6152 diff --git src/lib/annoGrator.c src/lib/annoGrator.c index 2a1046c..6b70fb5 100644 --- src/lib/annoGrator.c +++ src/lib/annoGrator.c @@ -28,31 +28,31 @@ struct annoRow *qRow, *prevQRow = NULL, *nextQRow; for (qRow = self->qHead; qRow != NULL; qRow = nextQRow) { nextQRow = qRow->next; int cDifRowP = strcmp(qRow->chrom, chrom); if (cDifRowP > 0 || (cDifRowP == 0 && qRow->start >= start)) break; else if (cDifRowP < 0 || qRow->end < start) { if (prevQRow == NULL) self->qHead = qRow->next; else prevQRow->next = qRow->next; if (self->qTail == qRow) self->qTail = prevQRow; - annoRowFree(&qRow, (struct annoStreamer *)self); + annoRowFree(&qRow, self->mySource); } else prevQRow = qRow; } } INLINE void agCheckInternalSorting(struct annoRow *newRow, struct annoRow *qTail) /* Die if newRow precedes qTail. */ { if (qTail != NULL) { int cDifNewTail = strcmp(newRow->chrom, qTail->chrom); if (cDifNewTail < 0) errAbort("Unsorted input from internal source (%s < %s)", newRow->chrom, qTail->chrom); @@ -106,31 +106,31 @@ /* Given a single row from the primary source, get all overlapping rows from internal * source, and produce joined output rows. If retRJFilterFailed is non-NULL and any * overlapping row has a rightJoin filter failure (see annoFilter.h), * set retRJFilterFailed and stop. */ { struct annoRow *rowList = NULL; agCheckPrimarySorting(self, primaryRow); agTrimToStart(self, primaryRow->chrom, primaryRow->start); agFetchToEnd(self, primaryRow->chrom, primaryRow->end); boolean rjFailHard = (retRJFilterFailed != NULL); struct annoRow *qRow; for (qRow = self->qHead; qRow != NULL; qRow = qRow->next) { if (qRow->start < primaryRow->end && qRow->end > primaryRow->start) { - slAddHead(&rowList, annoRowClone(qRow, (struct annoStreamer *)self)); + slAddHead(&rowList, annoRowClone(qRow, self->mySource)); if (rjFailHard && qRow->rightJoinFail) { *retRJFilterFailed = TRUE; break; } } } slReverse(&rowList); return rowList; } void annoGratorClose(struct annoStreamer **pSelf) /* Free self (including mySource). */ { if (pSelf == NULL)