15d0836b4dba65919e83ce5ef0aaafe5a0edc72f angie Wed Apr 17 12:49:53 2013 -0700 Making annoGratorGpVar able to handle VCF input too. In order for a grator tosee what type of input is coming from the primary source, the streamer should be passed in along with the primary row, as it is for formatters now. refs #6152 diff --git src/lib/annoGrator.c src/lib/annoGrator.c index 1c85286..f2b4055 100644 --- src/lib/annoGrator.c +++ src/lib/annoGrator.c @@ -91,40 +91,41 @@ self->qHead = self->qTail = newRow; } else { self->qTail->next = newRow; self->qTail = newRow; } if (cDifNewP > 0) // newRow->chrom comes after chrom; we're done for now break; } } } } -struct annoRow *annoGratorIntegrate(struct annoGrator *self, struct annoRow *primaryRow, +struct annoRow *annoGratorIntegrate(struct annoGrator *self, struct annoStreamRows *primaryData, boolean *retRJFilterFailed, struct lm *callerLm) /* 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: * - any overlapping row has a rightJoin filter failure (see annoFilter.h), or * - overlap rule is agoMustOverlap and no rows overlap, or * - overlap rule is agoMustNotOverlap and any overlapping row is found, * then set retRJFilterFailed and stop. */ { +struct annoRow *primaryRow = primaryData->rowList; struct annoRow *rowList = NULL; agCheckPrimarySorting(self, primaryRow); agTrimToStart(self, primaryRow->chrom, primaryRow->start); agFetchToEnd(self, primaryRow->chrom, primaryRow->end); boolean rjFailHard = (retRJFilterFailed != NULL); if (rjFailHard) *retRJFilterFailed = FALSE; struct annoRow *qRow; for (qRow = self->qHead; qRow != NULL; qRow = qRow->next) { if (qRow->start < primaryRow->end && qRow->end > primaryRow->start && sameString(qRow->chrom, primaryRow->chrom)) { int numCols = self->mySource->numCols; enum annoRowType rowType = self->mySource->rowType;