term class
Superclasses:
Data structure containing information about Gene Ontology (GO) term
Description
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.
Construction
geneont | Create geneont object and term objects |
Properties
definition | Read-only character vector that defines GO term |
id | Read-only numeric value that corresponds to GO identifier of GO term |
is_a | Read-only numeric array containing GO identifiers of GO terms that have an “is a” relationship with this GO term |
name | Read-only character vector representing name of GO term |
obsolete | Read-only Boolean value that indicates whether a GO term is obsolete |
ontology | Read-only character vector describing the ontology of GO term |
part_of | Read-only numeric array containing GO identifiers of GO terms that have a “part of” relationship with this GO term |
synonym | Read-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.
Indexing
You can use parenthesis () indexing to access the terms in an array of handles to term objects. See Examples below.
Examples
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.
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: id name ontology definition comment synonym is_a part_of obsolete
Note
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.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