Main Content

get

Retrieve property of object

Description

example

S = get(object) returns a structure containing a field for each property of a BioRead or BioMap object.

example

propertyValues = get(object,propertyNames) returns the values of the properties specified by propertyNames.

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 the data from the object. data is a structure containing a field for each object property, such as Quality, Sequence, Header, NSeqs, and Name.

data = get(br)
data = struct with fields:
     Quality: {1501x1 cell}
    Sequence: {1501x1 cell}
      Header: {1501x1 cell}
       NSeqs: 1501
        Name: ''

Retrieve the header data only.

headers = get(br,'Header');

You can also retrieve a subset of properties.

subset = get(br,{'Header','NSeqs'});

Input Arguments

collapse all

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

Example: bioreadObj

Names of the object properties, specified as a character vector, string, string vector, or cell array of character vectors.

Example: {'Quality','Sequence'}

Output Arguments

collapse all

Object property data, returned as a structure containing a field for each property of the object.

Property values, returned as a cell array.

Version History

Introduced in R2010a