filterByFlag
Class: BioMap
Filter sequence reads by SAM flag
Syntax
Indices
= filterByFlag(BioObj
, FlagName
, FlagValue
)
Indices
= filterByFlag(BioObj
, Subset
, FlagName
, FlagValue
)
Indices
= filterByFlag(..., FlagName1
, FlagValue1
, FlagName2
, FlagValue2
,
...)
Description
returns Indices
= filterByFlag(BioObj
, FlagName
, FlagValue
)Indices
,
a vector of logical indices, indicating the read sequences in BioObj
,
a BioMap
object, with FlagName
set
to FlagValue
.
returns Indices
= filterByFlag(BioObj
, Subset
, FlagName
, FlagValue
)Indices
,
a vector of logical indices, indicating the read sequences that meet
the specified criteria from a subset of entries in a BioMap
object.
applies multiple flag filters in a single statement. Indices
= filterByFlag(..., FlagName1
, FlagValue1
, FlagName2
, FlagValue2
,
...)
Input Arguments
|
Object of the |
|
Either of the following to specify a subset of the elements
in
|
|
Character vector or string specifying one of the following flags to filter by:
|
|
Logical value indicating the status of a flag. A |
Output Arguments
|
Vector of logical indices, indicating the read sequences in |
Examples
Construct a BioMap
object, and then determine
the read sequences that are both mapped in a proper pair and first
in a pair:
% Construct a BioMap object from a SAM file BMObj1 = BioMap('ex1.sam'); % Filter the elements using 'pairedInMap' and 'readIsFirst' flags Indices = filterByFlag(BMObj1, 'pairedInMap', true,... 'readIsFirst', true); % Return the headers of the filtered elements filtered_Headers = BMObj1.Header(Indices);