05316c62e54dfd3cac589a1ae6001e84c357959b angie Mon Apr 23 08:24:28 2012 -0700 Feature #6152 (Variant Annotation Tool): enhancement to filter logic:filters can be for inclusion or exclusion when the condition is met, based on the new filter->isExclude. When a filter is set to rightJoin and it is for inclusion, annoGratorIntegrate propagates rightJoin failure if no rows overlap since the condition for inclusion has not been met. diff --git src/inc/annoGrator.h src/inc/annoGrator.h index 64b0c24..5bc625a 100644 --- src/inc/annoGrator.h +++ src/inc/annoGrator.h @@ -12,35 +12,37 @@ #include "annoStreamer.h" struct annoGrator /* annoStreamer that can integrate an internal annoStreamer's data * with data from a primary source. */ { struct annoStreamer streamer; // external annoStreamer interface // Public method that makes this a 'grator: struct annoRow *(*integrate)(struct annoGrator *self, struct annoRow *primaryRow, boolean *retRJFilterFailed); /* Integrate internal source's data with single row of primary source's data */ // Private members -- callers are on the honor system to access these using only methods above. struct annoStreamer *mySource; // internal source + struct annoRow *qHead; // head of FIFO queue of rows from internal source + struct annoRow *qTail; // head of FIFO queue of rows from internal source char *prevPChrom; // for detection of unsorted input from primary uint prevPStart; // for detection of unsorted input from primary boolean eof; // stop asking internal source for rows when it's done - struct annoRow *qHead; // head of FIFO queue of rows from internal source - struct annoRow *qTail; // head of FIFO queue of rows from internal source + boolean haveRJIncludeFilter; // TRUE if some filter has !isExclude && rightJoin; + // if TRUE and there are no overlapping rows, then RJ fail }; #endif//ndef ANNOGRATOR_H // ---------------------- annoGrator default methods ----------------------- struct annoRow *annoGratorIntegrate(struct annoGrator *self, struct annoRow *primaryRow, boolean *retRJFilterFailed); /* 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 annoGrator *annoGratorNew(struct annoStreamer *mySource); /* Make a new integrator of columns from mySource with (positions of) rows passed to integrate().