getMappingQuality
Class: BioMap
Retrieve sequence mapping quality scores from BioMap
object
Syntax
MappingQuality
= getMappingQuality(BioObj
)
MappingQuality
= getMappingQuality(BioObj
, Subset
)
Description
returns MappingQuality
= getMappingQuality(BioObj
)MappingQuality
,
a vector of integers specifying mapping quality scores for each read
sequence in BioObj
, a BioMap
object.
returns
mapping quality scores for only object elements specified by MappingQuality
= getMappingQuality(BioObj
, Subset
)Subset
.
Input Arguments
|
Object of the |
|
One of the following to specify a subset of the elements in
Note If you use a cell array of headers to specify |
Output Arguments
|
|
Examples
Construct a BioMap
object, and then retrieve
the mapping quality scores for different elements in the object:
% Construct a BioMap object from a SAM file BMObj1 = BioMap('ex1.sam'); % Retrieve the mapping quality property of the second element in % the object MQ_2 = getMappingQuality(BMObj1, 2)
MQ_2 = 99
% Retrieve the mapping quality properties of the first and third % elements in the object MQ_1_3 = getMappingQuality(BMObj1, [1 3])
MQ_1_3 = 99 99
% Retrieve the mapping quality properties of all elements in the % object MQ_All = getMappingQuality(BMObj1);
Alternatives
An alternative to using the getMappingQuality
method
is to use dot indexing with the MappingQuality
property:
BioObj.MappingQuality(Indices)
In the previous syntax, Indices
is a vector of positive integers or
a logical vector. Indices
cannot be a cell array of character
vectors or string vector containing sequence headers.