| Contents | Index |
Set mate positions of read sequences in BioMap object
NewObj = setMatePosition(BioObj,MatePos)
NewObj = setMatePosition(BioObj,MatePos,Subset)
NewObj = setMatePosition(BioObj,MatePos) returns NewObj, a new BioMap object, constructed from BioObj, an existing BioMap object, with the MatePosition property set to MatePos, a vector of nonnegative integers specifying the mate positions of the read sequences with respect to the position numbers in the reference sequence.
NewObj = setMatePosition(BioObj,MatePos,Subset) returns NewObj, a new BioMap object, constructed from BioObj, an existing BioMap object, with the MatePosition property of a subset of the elements set to MatePos, a vector of nonnegative integers specifying the mate positions of the read sequences with respect to the position numbers in the reference sequence. The setMatePosition method sets the mate positions for only the object elements specified by Subset.
To update mate positions in an existing BioMap object, use the same object as the input BioObj and the output NewObj.
BioObj |
Object of the BioMap class. |
MatePos |
Vector of nonnegative integers specifying the mate positions of the read sequences with respect to the position numbers in the reference sequence. |
Subset |
One of the following to specify a subset of the elements in BioObj:
|
NewObj |
Object of the BioMap class. |
Construct a BioMap object, and then set a subset of the sequence mate position values:
% Construct a BioMap object from a SAM file and determine the header for the second element
BMObj1 = BioMap('ex1.sam');
BMObj1.Header(2)ans =
'EAS54_65:7:152:368:113'% Set the MatePosition property of the second element to a new value of 5
BMObj1 = setMatePosition(BMObj1, 5, {'EAS54_65:7:152:368:113'});% Set the MatePosition properties of the first and third elements in % the object to 6 and 7 respectively BMObj1 = setMatePosition(BMObj1, [6 7], [1 3]);
% Set the MatePosition property of all elements in the object to zero y = zeros(1,BMObj1.NSeqs); BMObj1 = setMatePosition(BMObj1,y);
An alternative to using the setMatePosition method to update an existing object is to use dot indexing with the MatePosition property:
BioObj.MatePosition(Indices) = NewMatePos
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. NewMatePos is a vector of integers specifying the mate positions of the read sequences with respect to the position numbers in the reference sequence. Indices and NewMatePos must have the same number and order of elements.

See how to analyze, visualize, and model biological data and systems using MathWorks products.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |