Class: BioMap

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.

Input Arguments


Object of the BioMap class.


One of the following to specify a subset of the elements in BioObj:

  • Vector of positive integers

  • Logical vector

  • Cell array of strings containing valid sequence headers

    Note:   If you use a cell array of header strings to specify Subset, be aware that a repeated header specifies all elements with that header.

Output Arguments


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 =

% Retrieve the mapping quality properties of the first and third
% elements in the object
MQ_1_3 = getMappingQuality(BMObj1, [1 3])
MQ_1_3 =

% 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.

Was this topic helpful?