Class: BioMap
Retrieve mate positions of read sequences from BioMap
object
MatePos = getMatePosition(BioObj)
MatePos = getMatePosition(BioObj,Subset)
returns MatePos
= getMatePosition(BioObj
)MatePos
,
a vector of nonnegative integers specifying the mate positions of
read sequences with respect to the position numbers in the reference
sequence from a BioMap
object.
returns
mate positions for only read sequences specified by MatePos
= getMatePosition(BioObj
,Subset
)Subset
.
|
Object of the |
|
One of the following to specify a subset of the elements in
Note If you use a cell array of headers to specify |
|
Not all values in the |
Construct a BioMap
object, and then retrieve
the mate position for different sequences in the object:
% Construct a BioMap object from a SAM file and determine the header for the 17th element BMObj1 = BioMap('ex1.sam'); BMObj1.Header(17)
ans = 'EAS114_32:5:78:583:499'
% Retrieve the MatePosition property of the 17th element in the object using the header MatePos_17 = getMatePosition(BMObj1,{'EAS114_32:5:78:583:499'})
MatePos_17 = 229 37
Notice the previous example returned two mate positions. This
is because the header EAS114_32:5:78:583:499
is
a repeated header in the BMObj1
object. The getMatePosition
method
returns mate positions for all elements in the object with that header.
% Retrieve the MatePosition properties of the 37th and 47th elements in % the object MatePos_37_47 = getMatePosition(BMObj1, [37 47])
MatePos_37_47 = 95 283
% Retrieve the MatePosition properties of all elements in the object MatePos_All = getMatePosition(BMObj1);
An alternative to using the getMatePosition
method
is to use dot indexing with the MatePosition
property:
BioObj.MatePosition(Indices)
In the previous syntax, Indices
is a vector of positive integers or
a logical vector. Indices
cannot be a cell array of character
vectors or string vector containing sequence headers.