Main Content

getReferenceNames

Retrieve reference names from GTFAnnotation or GFFAnnotation object

Description

example

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

Examples

collapse all

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 = 1x1 cell array
    {'chr2'}

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

Construct a GFFAnnotation object from a GFF file.

GFFAnnotObj = GFFAnnotation('tair8_1.gff');

Return reference names for the annotation object.

refNames = getReferenceNames(GFFAnnotObj)
refNames = 1x1 cell array
    {'Chr1'}

Input Arguments

collapse all

Feature annotations, specified as a GTFAnnotation or GFFAnnotation object.

Output Arguments

collapse all

Names of all reference sequences in AnnotObj, returned as a cell array of character vectors.

Version History

Introduced in R2011b