setSignature
Class: BioMap
Set signature (alignment information) for BioMap object
Syntax
NewObj = setSignature(BioObj, Signature)
NewObj = setSignature(BioObj, Signature, Subset)
Description
returns NewObj = setSignature(BioObj, Signature)NewObj,
a new BioMap object, constructed from BioObj,
an existing BioMap object, with the Signature property
set to Signature, a cell array of CIGAR-formatted
character vectors, each representing how a read sequence aligns to
the reference sequence.
returns NewObj = setSignature(BioObj, Signature, Subset)NewObj,
a new BioMap object, constructed from BioObj,
an existing BioMap object, with the Signature property
of a subset of the elements set to Signature,
a cell array of CIGAR-formatted character vectors, each representing
how read sequences, specified by Subset,
align to the reference sequence. It sets the signature for only the
object elements specified by Subset.
Input Arguments
| Object of the Note If |
| Cell array of CIGAR-formatted character vectors, each representing how a read sequence aligns to the reference sequence. Signature can be empty. |
| 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 signatures:
% Construct a BioMap object from a SAM file
BMObj1 = BioMap('ex1.sam');
% Set the Signature property of the second element to a new value
BMObj1 = setSignature(BMObj1, {'36M'}, 2);Tips
To update signatures in an existing
BioMapobject, use the same object as the inputBioObjand the outputNewObj.If you modify sequences or start positions in an object, you may need to use the
setSignaturemethod to modify theSignatureproperty of modified sequences accordingly.
Alternatives
An alternative to using the setSignature method
to update an existing object is to use dot indexing with the Signature property:
BioObj.Signature(Indices) = NewSignature
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. NewSignature is
a character vector or a cell array of CIGAR-formatted character vectors,
each representing how a read sequence aligns to the reference sequence.
Signature can be empty. Indices and NewSignature must
have the same number and order of elements.