Main Content

getHeader

Retrieve sequence headers from object

Description

headers = getHeader(object) returns sequence headers (names) from a BioRead or BioMap object.

example

subsetHeaders = getHeader(object,subset) returns the header information subsetHeaders for only the object elements specified by subset.

example

Examples

collapse all

Store read data from a SAM-formatted file in a BioRead object.

br = BioRead('ex1.sam')
br = 
  BioRead with properties:

     Quality: [1501x1 File indexed property]
    Sequence: [1501x1 File indexed property]
      Header: [1501x1 File indexed property]
       NSeqs: 1501
        Name: ''


Retrieve sequence header information.

allHeaders = getHeader(br);

Retrieve sequence header information from the first and third elements in the object.

subset = getHeader(br,[1 3])
subset = 2x1 cell
    {'B7_591:4:96:693:509'}
    {'EAS51_64:8:5:734:57'}

Use a logical vector to get the same information.

subset2 = getHeader(br,[true false true])
subset2 = 2x1 cell
    {'B7_591:4:96:693:509'}
    {'EAS51_64:8:5:734:57'}

Access each property of the object by using the dot notation.

allHeaders  = br.Header;
subset      = br.Header([1 3])
subset = 2x1 cell
    {'B7_591:4:96:693:509'}
    {'EAS51_64:8:5:734:57'}

Input Arguments

collapse all

Object containing the read data, specified as a BioRead or BioMap object.

Example: bioreadObj

Subset of elements in the object, specified as a vector of positive integers, logical vector, string vector, or cell array of character vectors containing valid sequence headers.

Example: [1 3]

Output Arguments

collapse all

Sequence headers, returned as a cell array of character vectors.

Sequence headers for a subset of elements from the object, returned as a cell array of character vectors.

Version History

Introduced in R2010a