getReferenceNames

Class: GTFAnnotation

Retrieve reference names from GTFAnnotation object

Syntax

References = getReferenceNames(AnnotObj)

Description

References = getReferenceNames(AnnotObj) returns References, a cell array of strings specifying the names of all reference sequences in AnnotObj.

Input Arguments

AnnotObj

Object of the GTFAnnotation class.

Output Arguments

References

Cell array of strings specifying the names of all reference sequences in AnnotObj

Examples

Construct a GTFAnnotation object from a GTF-formatted file that is provided with Bioinformatics Toolbox™, and then return the names of the reference sequences from the annotation object:

% Construct a GTFAnnotation object from a GTF file
GTFAnnotObj = GTFAnnotation('hum37_2_1M.gtf');
% Return reference names for the annotation object
refNames = getReferenceNames(GTFAnnotObj)
refNames = 

    'chr2'
Was this topic helpful?