Main Content

GTFAnnotation class


Contain Gene Transfer Format (GTF) annotations


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

You construct a GTFAnnotation object from a 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.


Annotobj = GTFAnnotation(File) constructs Annotobj, a GTFAnnotation object, from File, a GTF-formatted file.

Input Arguments


Character vector or string specifying a GTF-formatted file.



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


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


getDataCreate structure containing subset of data from GTFAnnotation object
getExonsReturn table of exons from GTFAnnotation object
getFeatureNamesRetrieve unique feature names from GTFAnnotation object
getGeneNamesRetrieve unique gene names from GTFAnnotation object
getGenesReturn table of unique genes in GTFAnnotation object
getIndexReturn index array of annotations from GTFAnnotation object
getRangeRetrieve range of annotations from GTFAnnotation object
getReferenceNamesRetrieve reference names from GTFAnnotation object
getSegmentsReturn table of non-overlapping segments from GTFAnnotation object
getSubsetCreate object containing subset of elements from GTFAnnotation object
getTranscriptNamesRetrieve unique transcript names from GTFAnnotation object
getTranscriptsReturn table of unique transcripts in GTFAnnotation object

Copy Semantics

Value. To learn how value classes affect copy operations, see Copying Objects.


GTFAnnotation objects support dot . indexing to extract properties.


Construct a GTFAnnotation object from a GTF-formatted file that is provided with Bioinformatics Toolbox™:

GTFAnnotObj = GTFAnnotation('hum37_2_1M.gtf')
GTFAnnotObj = 

  GTFAnnotation with properties:

    FieldNames: {1x11 cell}
    NumEntries: 308