Main Content

geneont class

Superclasses:

Data structure containing Gene Ontology (GO) information

Description

A geneont object is a data structure containing Gene Ontology information. You can explore and traverse Gene Ontology terms using “is_a” and “part_of” relationships.

Construction

geneontCreate geneont object and term objects

Methods

getancestorsFind terms that are ancestors of specified Gene Ontology (GO) term
getdescendantsFind terms that are descendants of specified Gene Ontology (GO) term
getmatrixConvert geneont object into relationship matrix
getrelativesFind terms that are relatives of specified Gene Ontology (GO) term

Properties

dateRead-only character vector containing date and time OBO file was last updated
default_namespaceRead-only character vector containing namespace to which GO terms are assigned
format_versionRead-only character vector containing version of encoding of OBO file
termsRead-only column vector with handles to term objects of geneont object

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.

Indexing

You can use parenthesis () indexing with either GO identifiers (numbers) or by GO terms (term objects) to create a subontology. See Examples below.

Examples

Example 15. Indexing into a geneont Object Using the GO Identifier

You can create a subontology by indexing into a geneont object by using the GO identifier.

  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 27769 Terms.
  2. Create a subontology by returning the terms with GO identifiers of GO:000005 through GO:000010.

    subontology1 = GeneontObj(5:10)
    
    Gene Ontology object with 6 Terms.
  3. Create a subontology by returning the term with a GO identifier of GO:000100.

    subontology2 = GeneontObj(100)
    
    Gene Ontology object with 1 Terms.
Example 16. Indexing into a geneont Object Using the GO Term

You can create a subontology by indexing into a geneont object by using the GO term.

  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 27769 Terms.
  2. Create an array of term objects containing the fifth through tenth terms of the geneont object.

    termObject = GeneontObj.terms(5:10)
    
    6x1 struct array with fields:
        id
        name
        ontology
        definition
        comment
        synonym
        is_a
        part_of
        obsolete

    Note

    The GO term of 5 is the position of the term object in the geneont object, and is not necessarily the same as the term object with a GO identifier of GO:000005 used in the first example. This is because there are many terms that are obsolete and are not included as term objects in the geneont object.

  3. Create a subontology by returning the fifth through tenth terms of the geneont object.

    subontology3 = GeneontObj(termObject)
    
    Gene Ontology object with 6 Terms.