Main Content

GFFAnnotation

Contain General Feature Format (GFF) annotations

Description

The GFFAnnotation object contains annotations for one or more reference sequences, conforming to the GFF file format.

Each element in the object represents an annotation. Use the object properties and methods to filter annotations by feature, reference sequence, or reference sequence position. Use object methods to extract data for a subset of annotations into an array of structures.

Creation

Construct a GFFAnnotation object from a GFF- or GTF-formatted file.

Annotobj = GFFAnnotation(File) constructs a GFFAnnotation object Annotobj from File. Here, File is a character vector or string specifying a GFF- or GTF-formatted file.

Properties

expand all

Names of the available data fields for each annotation in the GFFAnnotation object, returned as a cell array of character vectors. This property is read only.

Data Types: cell

Number of annotations in the GFFAnnotation object, returned as an integer. This property is read only.

Data Types: double

Object Functions

getDataCreate structure containing subset of data from GTFAnnotation or GFFAnnotation object
getFeatureNamesRetrieve unique feature names from GTFAnnotation or GFFAnnotation object
getIndexReturn index array of annotations from GTFAnnotation or GFFAnnotation object
getRangeRetrieve range of annotations from GTFAnnotation or GFFAnnotation object
getReferenceNamesRetrieve reference names from GTFAnnotation or GFFAnnotation object
getSubsetRetrieve subset of elements from GTFAnnotation or GFFAnnotation object

Examples

collapse all

Construct a GFFAnnotation object from a GFF-formatted file that is provided with Bioinformatics Toolbox™.

GFFAnnotObj1 = GFFAnnotation('tair8_1.gff')
GFFAnnotObj1 = 
  GFFAnnotation with properties:

    FieldNames: {'Reference'  'Start'  'Stop'  'Feature'  'Source'  'Score'  'Strand'  'Frame'  'Attributes'}
    NumEntries: 3331

Construct a GFFAnnotation object from a GTF-formatted file that is provided with Bioinformatics Toolbox™.

GFFAnnotObj2 = GFFAnnotation('hum37_2_1M.gtf')
GFFAnnotObj2 = 
  GFFAnnotation with properties:

    FieldNames: {'Reference'  'Start'  'Stop'  'Feature'  'Source'  'Score'  'Strand'  'Frame'  'Attributes'}
    NumEntries: 308

Version History

Introduced in R2011b