GFFAnnotation class

Represent General Feature Format (GFF) annotations

Description

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

You construct a GFFAnnotation object from a GFF- or GTF-formatted file. 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.

Construction

Annotobj = GFFAnnotation(File) constructs Annotobj, a GFFAnnotation object, from File, a GFF- or GTF-formatted file.

Input Arguments

File

String specifying a GFF- or GTF-formatted file.

Properties

FieldNames

Cell array of strings specifying the names of the available data fields for each annotation in the GFFAnnotation object. This property is read only.

NumEntries

Integer specifying number of annotations in the GFFAnnotation object. This property is read only.

Methods

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

Copy Semantics

Value. To learn how value classes affect copy operations, see Copying Objects in the MATLAB® documentation.

Indexing

GFFAnnotation objects support dot . indexing to extract properties.

Examples

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

GFFAnnotObj = GFFAnnotation('tair8_1.gff')
GFFAnnotObj = 

  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:

GFFAnnotObj = GFFAnnotation('hum37_2_1M.gtf')
GFFAnnotObj = 

  GFFAnnotation with properties:

    FieldNames: {'Reference'  'Start'  'Stop'  'Feature'  'Source'  'Score'  'Strand'  'Frame'  'Attributes'}
    NumEntries: 308
Was this topic helpful?