setStart
Class: BioMap
Set start positions of aligned read sequences in BioMap object
Syntax
NewObj = setStart(BioObj, Start)
NewObj = setStart(BioObj, Start, Subset)
Description
returns NewObj = setStart(BioObj, Start)NewObj,
a new BioMap object, constructed from BioObj,
an existing BioMap object, with the Start property
set to Start, a vector of positive integers
specifying the start positions of the aligned read sequences with
respect to the position numbers in the reference sequence. Modifying
the Start property shifts the aligned sequences.
returns NewObj = setStart(BioObj, Start, Subset)NewObj,
a new BioMap object, constructed from BioObj,
an existing BioMap object, with the Start property
of a subset of the elements set to Start,
a vector of positive integers specifying the start positions of the
aligned read sequences with respect to the position numbers in the
reference sequence. It sets the start positions for only the object
elements specified by Subset.
Input Arguments
| Object of the Note If |
| Vector of positive integers specifying the start positions of the aligned read sequences with respect to the position numbers in the reference sequence. |
| 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 sequence start values:
% Construct a BioMap object from a SAM file
BMObj1 = BioMap('ex1.sam');
% Set the Start property of the second element to a new value
BMObj1 = setStart(BMObj1, 5, 2);Tips
To update start positions in an existing
BioMapobject, use the same object as the inputBioObjand the outputNewObj.If you modify sequences or signatures in an object, you may need to use the
setStartmethod to modify theStartproperty to shift the alignment of modified sequences accordingly.
Alternatives
An alternative to using the setStart method
to update an existing object is to use dot indexing with the Start property:
BioObj.Start(Indices) = NewStart
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. NewStart is
a vector of integers specifying the start positions of the aligned
read sequences with respect to the position numbers in the reference
sequence. Indices and NewStart must
have the same number and order of elements.