Documentation Center

  • Trial Software
  • Product Updates

getStart

Class: BioMap

Retrieve start positions of aligned read sequences from BioMap object

Syntax

Start = getStart(BioObj)
Start = getStart(BioObj, Subset)

Description

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

Start = getStart(BioObj, Subset) returns a start 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 strings containing valid sequence headers

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

Output Arguments

Start

Start property of a subset of elements in BioObj. It is a vector of integers specifying the start position of aligned read sequences with respect to the position numbers in the reference sequence. It includes the start positions for only read sequences specified by Subset.

Examples

Construct a BioMap object, and then retrieve the start position for different sequences in the object:

% Construct a BioMap object from a SAM file 
BMObj1 = BioMap('ex1.sam');
% Retrieve the start property of the second element in the object
Start_2 = getStart(BMObj1, 2)
Start_2 =

           3
% Retrieve the start properties of the first and third elements in
% the object
Start_1_3 = getStart(BMObj1, [1 3])
Start_1_3 =

           1
           5
% Retrieve the start properties of all elements in the object
Start_All = getStart(BMObj1);

Alternatives

An alternative to using the getStart method is to use dot indexing with the Start property:

BioObj.Start(Indices)

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.

See Also

| |

How To

Related Links

Was this topic helpful?