setMappingQuality
Class: BioMap
Set sequence mapping quality scores for BioMap object
Syntax
NewObj = setMappingQuality(BioObj, MappingQuality)
NewObj = setMappingQuality(BioObj, MappingQuality, Subset)
Description
returns NewObj = setMappingQuality(BioObj, MappingQuality)NewObj,
a new BioMap object, constructed from BioObj,
an existing BioMap object, with the MappingQuality property
set to MappingQuality, a vector of integers
specifying the mapping quality scores for read sequences.
returns NewObj = setMappingQuality(BioObj, MappingQuality, Subset)NewObj,
a new BioMap object, constructed from BioObj,
an existing BioMap object, with the MappingQuality property
of a subset of the elements set to MappingQuality,
a vector of integers specifying the mapping quality scores for read
sequences. It sets the mapping quality scores for only the object
elements specified by Subset.
Input Arguments
| Object of the Note If |
| Vector of integers specifying the mapping quality scores for read sequences. |
| One of the following to specify a subset of the elements in
Note A one-to-one relationship must exist between the number and
order of elements in |
Output Arguments
| Object of the |
Examples
Construct a BioMap object, and then set
a subset of the mapping quality scores:
% Construct a BioMap object from a SAM file
BMObj1 = BioMap('ex1.sam');
% Set the Mapping Quality property of the second element to a new
% value
BMObj1 = setMappingQuality(BMObj1, 74, 2);Tips
To update mapping quality scores in an existing BioMap object,
use the same object as the input BioObj and
the output NewObj.
Alternatives
An alternative to using the setMappingQuality method
to update an existing object is to use dot indexing with the MappingQuality property:
BioObj.MappingQuality(Indices) = NewMappingQuality
In the previous syntax, Indices is
a vector of positive integers or a logical vector. Indices cannot
be a cell array of character vectors containing sequence headers. NewMappingQuality is
a vector of integers specifying the mapping quality scores for read
sequences. Indices and NewQuality must
have the same number and order of elements.