NewObj = setMatePosition(BioObj,MatePos)
NewObj = setMatePosition(BioObj,MatePos,Subset)
returns NewObj
= setMatePosition(BioObj
,MatePos
)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.
returns NewObj
= setMatePosition(BioObj
,MatePos
,Subset
)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
.

Object of the
 

Vector of nonnegative integers specifying the mate positions of the read sequences with respect to the position numbers in the reference sequence.  

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


Object of the 
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.