Main Content

term class


Data structure containing information about Gene Ontology (GO) term


A term object is a data structure containing information about a Gene Ontology (GO) term. You can explore and traverse Gene Ontology terms using “is_a” and “part_of” relationships.


geneontCreate geneont object and term objects


definitionRead-only character vector that defines GO term
idRead-only numeric value that corresponds to GO identifier of GO term
is_aRead-only numeric array containing GO identifiers of GO terms that have an “is a” relationship with this GO term
nameRead-only character vector representing name of GO term
obsoleteRead-only Boolean value that indicates whether a GO term is obsolete
ontologyRead-only character vector describing the ontology of GO term
part_ofRead-only numeric array containing GO identifiers of GO terms that have a “part of” relationship with this GO term
synonymRead-only array containing GO terms that are synonyms of this GO term

Instance Hierarchy

A geneont object contains term objects.

Copy Semantics

Handle. To learn how this affects your use of the class, see Copying Objects in the MATLAB® Programming Fundamentals documentation.


You can use parenthesis () indexing to access the terms in an array of handles to term objects. See Examples below.


  1. Download the current version of the Gene Ontology database from the Web into a geneont object in the MATLAB software.

    GeneontObj = geneont('LIVE', true)

    The MATLAB software creates a geneont object and displays the number of term objects associated with the geneont object.

    Gene Ontology object with 27827 Terms.
  2. Use the terms property to create a variable containing an array of handles to the term objects of the geneont object.

    array_of_terms = GeneontObj.terms
    27827x1 struct array with fields:


    Although the terms property is an array of handles to term objects, in the MATLAB Command Window, it displays as a structure array, with one structure for each GO term in the geneont object.

  3. Return the fifth term (term object) of the geneont object.

    fifth_term = array_of_terms(5)
                id: 6
              name: [1x60 char]
          ontology: 'molecular function'
        definition: [1x321 char]
           comment: ''
           synonym: []
              is_a: 5385
           part_of: [0x1 double]
          obsolete: 0

See Also