Package htsjdk.samtools.filter
Class IntervalFilter
- java.lang.Object
-
- htsjdk.samtools.filter.IntervalFilter
-
- All Implemented Interfaces:
SamRecordFilter
public class IntervalFilter extends Object implements SamRecordFilter
Filter SAMRecords so that only those that overlap the given list of intervals. It is required that the SAMRecords are passed in coordinate order, and have non-null SAMFileHeaders. $Id$
-
-
Constructor Summary
Constructors Constructor Description IntervalFilter(List<Interval> intervals, SAMFileHeader samHeader)
Prepare to filter out SAMRecords that do not overlap the given list of intervals
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
filterOut(SAMRecord record)
Determines whether a SAMRecord matches this filterboolean
filterOut(SAMRecord first, SAMRecord second)
Determines whether a pair of SAMRecord matches this filter
-
-
-
Constructor Detail
-
IntervalFilter
public IntervalFilter(List<Interval> intervals, SAMFileHeader samHeader)
Prepare to filter out SAMRecords that do not overlap the given list of intervals- Parameters:
intervals
- -- must be locus-ordered & non-overlapping
-
-
Method Detail
-
filterOut
public boolean filterOut(SAMRecord record)
Determines whether a SAMRecord matches this filter- Specified by:
filterOut
in interfaceSamRecordFilter
- Parameters:
record
- the SAMRecord to evaluate- Returns:
- true if the SAMRecord matches the filter, otherwise false
-
filterOut
public boolean filterOut(SAMRecord first, SAMRecord second)
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 the SAMRecords matches the filter, otherwise false
-
-