Package htsjdk.samtools.filter
Class TagFilter
java.lang.Object
htsjdk.samtools.filter.TagFilter
- All Implemented Interfaces:
SamRecordFilter
Filter class for matching tag attributes in SAMRecords
$Id$
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for a single valueConstructor for a single valueConstructor for multiple valuesConstructor for multiple values -
Method Summary
-
Constructor Details
-
TagFilter
Constructor for a single value- Parameters:
tag- the key of the tag to matchvalue- the value to match
-
TagFilter
Constructor for multiple values- Parameters:
tag- the key of the tag to matchvalues- the matching values
-
TagFilter
Constructor for a single value- Parameters:
tag- the key of the tag to matchvalue- the value to matchincludeReads- whether to include or not include reads that match filter
-
TagFilter
Constructor for multiple values- Parameters:
tag- the key of the tag to matchvalues- the matching valuesincludeReads- whether to include or not include reads that match filter
-
-
Method Details
-
filterOut
Determines whether a SAMRecord matches this filter- Specified by:
filterOutin interfaceSamRecordFilter- Parameters:
record- the SAMRecord to evaluate- Returns:
- the XOR of SAMRecord matches the filter and includeReads.
-
filterOut
Determines whether a paired of SAMRecord matches this filter- Specified by:
filterOutin interfaceSamRecordFilter- Parameters:
first- the first SAMRecord to evaluatesecond- the second SAMRecord to evaluate- Returns:
- true if includeReads is true and neither SAMRecord matches filter true if includeReads is false and both SAMRecords match filter otherwise false
-