Package htsjdk.samtools.filter
Class IntervalKeepPairFilter
java.lang.Object
htsjdk.samtools.filter.IntervalKeepPairFilter
- All Implemented Interfaces:
SamRecordFilter
Filter out SAMRecords where neither record of a pair overlaps a given set of
intervals. If one record of a pair overlaps the interval list, than both are
kept. It is required that the SAMRecords are passed in coordinate order, have
non-null SAMFileHeaders, and that Mate Cigar (MC) is present.
-
Constructor Summary
ConstructorsConstructorDescriptionIntervalKeepPairFilter
(List<Interval> intervals) Prepare to filter out SAMRecords that do not overlap the given list of intervals -
Method Summary
-
Constructor Details
-
IntervalKeepPairFilter
Prepare to filter out SAMRecords that do not overlap the given list of intervals- Parameters:
intervals
-
-
-
Method Details
-
filterOut
Determines whether a SAMRecord matches this filter. Takes record, finds the location of its mate using the MC tag. Checks if either record overlaps the current interval using overlap detector. If yes, return false -> don't filter it out. If a read is secondary, supplementary, or single ended, filter read out. UseIntervalFilter
if you want to keep these reads, but NOTE: the resulting bam may not be valid.- Specified by:
filterOut
in interfaceSamRecordFilter
- Parameters:
record
- the SAMRecord to evaluate- Returns:
- true if the SAMRecord matches the filter, otherwise false
-
filterOut
Determines whether a pair of SAMRecord matches this filter- Specified by:
filterOut
in interfaceSamRecordFilter
- Parameters:
first
- the first SAMRecord to evaluatesecond
- the second SAMRecord to evaluate- Returns:
- true if both SAMRecords do not overlap the interval list
-