Retrieve sequence mapping quality scores from BioMap object
MappingQuality = getMappingQuality(BioObj)
MappingQuality = getMappingQuality(BioObj, Subset)
MappingQuality = getMappingQuality(BioObj) returns MappingQuality, a vector of integers specifying mapping quality scores for each read sequence in BioObj, a BioMap object.
MappingQuality = getMappingQuality(BioObj, Subset) returns mapping quality scores for only object elements specified by Subset.
Object of the BioMap class.
One of the following to specify a subset of the elements in BioObj:
MappingQuality property of a subset of elements in BioObj. MappingQuality is a vector of integers specifying the mapping quality scores for read sequences specified by Subset.
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);
An alternative to using the getMappingQuality method is to use dot indexing with the MappingQuality property:
In the previous syntax, Indices is a vector of positive integers or a logical vector. Indices cannot be a cell array of strings containing sequence headers.