Main Content

getStop

Class: BioMap

Compute stop positions of aligned read sequences from BioMap object

Syntax

Stop = getStop(BioObj)
Stop = getStop(BioObj, Subset)

Description

Stop = getStop(BioObj) returns Stop, a vector of integers specifying the stop position of aligned read sequences with respect to the position numbers in the reference sequence from a BioMap object.

Stop = getStop(BioObj, Subset) returns a stop position for only read sequences specified by Subset.

Input Arguments

BioObj

Object of the BioMap class.

Subset

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

  • Vector of positive integers

  • Logical vector

  • Cell array of character vectors containing valid sequence headers

Note

If you use a cell array of headers to specify Subset, be aware that a repeated header specifies all elements with that header.

Output Arguments

Stop

Vector of integers specifying the stop position of aligned read sequences with respect to the position numbers in the reference sequence. Stop includes the stop positions for only read sequences specified by Subset.

Examples

Construct a BioMap object, and then compute the stop position for different sequences in the object:

% Construct a BioMap object from a SAM file 
BMObj1 = BioMap('ex1.sam');
% Compute the stop position of the second sequence in the object
Stop_2 = getStop(BMObj1, 2)
Stop_2 =

          37
% Compute the stop positions of the first and third sequences in
% the object
Stop_1_3 = getStop(BMObj1, [1 3])
Stop_1_3 =

          36
          39
% Compute the stop positions of all sequences in the object
Stop_All = getStop(BMObj1);