term
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.
A term
object has handle copy semantics. To learn how this affects your
use of the class, see Copying Objects in the MATLAB® Programming Fundamentals documentation.
Creation
A term
object is part of the terms
property of a
Gene Ontology
object. Create a Gene Ontology
object using
the geneont
command.
Properties
definition
— Definition of the GO term
character vector
This property is read-only.
Definition of the GO term. specified as a character vector.
Tip
If you know the GO identifier (for example, 314) of a term object, instead of its index or position number (for example, 287), you can use the following syntax to display the definition of a term object:
GeneontObj(314).terms.definition
For an example, see Investigate Gene Ontology Term Properties.
Data Types: char
id
— GO identifier of GO term
numeric scalar
This property is read-only.
GO identifier of GO term, specified as a numeric scalar.
Tip
You can use the num2goid
function to convert
id
to a GO ID character vector formatted as a 7-digit number
preceded by the prefix GO:
, which is the standard used by the Gene
Ontology database.
Tip
You can use the id
property for a GO term as input to methods
of a geneont
object, such as getancestors
, getdescendants
, and getrelatives
.
Data Types: single
| double
is_a
— GO identifiers of GO terms that have an “is a” relationship with this GO term
numeric array
This property is read-only.
GO identifiers of GO terms that have an “is a” relationship with this GO term, specified as a numeric array.
Tip
You can also use the getancestors
method of a geneont object
with the 'Relationtype'
property set to 'is_a'
to determine term objects with an “is a” relationship.
Tip
If you know the GO identifier (for example, 42321) of a term object, instead of
its index or position number (for example, 18703), you can use the following syntax to
display the is_a
property of a term object:
GeneontObj(42321).terms.is_a
For an example, see Investigate Gene Ontology Term Properties.
Data Types: single
| double
name
— Name of GO term
character vector
This property is read-only.
Name of GO term, specified as a character vector.
Data Types: char
| string
obsolete
— Indication that term is obsolete
logical value
This property is read-only.
Indication that term is obsolete, specified as a logical value.
Tip
If you know the GO identifier (for example, 8) of a term object, instead of its index or position number (for example, 7), you can use the following syntax to display the obsolete status of a term object:
GeneontObj(8).terms.obsolete
For an example, see Investigate Gene Ontology Term Properties.
Data Types: logical
ontology
— Ontology of GO term
'molecular function'
| 'biological process'
| 'cellular component'
This property is read-only.
Ontology of GO term, specified as one of these values:
'molecular function'
'biological process'
'cellular component'
Use the ontology
property to determine the ontology of term
objects, or to access or filter term objects by ontology.
Tip
If you know the GO identifier (for example, 179) of a term object, instead of its index or position number (for example, 155), you can use the following syntax to display the ontology of a term object:
GeneontObj(179).terms.ontology
For an example, see Investigate Gene Ontology Term Properties.
Data Types: char
part_of
— GO identifiers of GO terms that have a “part of” relationship with this GO term
numeric array
This property is read-only.
GO identifiers of GO terms that have a “part of” relationship with this GO term, specified as a numeric array.
Tip
You can also use the getancestors
method of a
geneont
object with the 'Relationtype'
property set to 'part_of'
to determine term objects with a
“part of” relationship.
Tip
If you know the GO identifier (for example, 42321) of a term object, instead of
its index or position number (for example, 18703), you can use the following syntax to
display the part_of
property of a term object:
GeneontObj(42321).terms.part_of
For an example, see Investigate Gene Ontology Term Properties.
Data Types: single
| double
synonym
— GO terms that are synonyms of this GO term
two-column cell array
This property is read-only.
GO terms that are synonyms of this GO term, specified as a two-column cell array.
The first column contains a character vector specifying the type of synonym, such as
'exact_synonym'
, 'related_synonym'
,
'broad_synonym'
, 'narrow_synonym'
, or
'alt_id'
. The second column contains the GO identifier of the
synonymous term or a character vector describing the synonymous term.
Tip
If you know the GO identifier (for example, 398) of a term object, instead of its index or position number (for example, 352), you can use the following syntax to display the synonym of a term object:
GeneontObj(398).terms.synonym
For an example, see Investigate Gene Ontology Term Properties.
Data Types: cell
Examples
Investigate Gene Ontology Term Properties
Investigate some of a properties of Gene ontology (GO) term
object. First download the current Gene Ontology database into a geneont
object.
GeneontObj = geneont('LIVE', true)
Gene Ontology object with 47331 Terms.
Investigate Ontology
Display the ontology of the term
object in the 155th position in GeneontObj
.
GeneontObj.terms(155).ontology
ans = 'biological process'
Create a cell array of character vectors that list the ontology
property for each term
in GeneontObj
.
ontologies = get(GeneontObj.terms,'ontology');
size(ontologies)
ans = 1×2
47331 1
Create a logical mask that identifies all the terms with an ontology
property of 'cellular component'
.
mask = strcmp(ontologies,'cellular component');
Apply the logical mask to all the terms in GeneontObj
to return a structure containing only terms with an ontology
property of 'cellular component'
.
cell_comp_terms = GeneontObj.terms(mask); size(cell_comp_terms)
ans = 1×2
4470 1
Investigate Names
Display the name
property of the term
object in the 157th position in GeneontObj
.
GeneontObj.terms(157).name
ans = 'obsolete activation of MAPKK (pseudohyphal growth)'
Find the index or position number of the term
object whose name
property is 'membrane'
.
membrane_index = find(strcmp(get(GeneontObj.terms,'name'),'membrane'))
membrane_index = 9883
Use this index or position number and the id
property to determine the GO identifier of the term
object.
membrane_goid = GeneontObj.terms(membrane_index).id
membrane_goid = 16020
Use this GO identifier as input to the getrelatives
method to find the GO identifiers of other term
objects that are immediate relatives of the term
object whose name property is 'membrane'
.
relative_ids = getrelatives(GeneontObj,membrane_goid)
relative_ids = 23×1
5628
5642
5886
16020
19867
19898
31090
31224
34045
34357
⋮
List the name
properties of these term
objects.
lst = GeneontObj(relative_ids).terms;
get(lst,'name')
ans = 23×1 cell
{'prospore membrane' }
{'annulate lamellae' }
{'plasma membrane' }
{'membrane' }
{'outer membrane' }
{'extrinsic component of membrane' }
{'organelle membrane' }
{'intrinsic component of membrane' }
{'phagophore assembly site membrane' }
{'photosynthetic membrane' }
{'ascus membrane' }
{'nuclear outer membrane-endoplasmic reticulum membrane network'}
{'coated membrane' }
{'prospore membrane leading edge' }
{'respirasome' }
{'leaflet of membrane bilayer' }
{'side of membrane' }
{'plasma membrane region' }
{'membrane protein complex' }
{'membrane microdomain' }
{'cellular anatomical entity' }
{'pathogen-containing vacuole membrane' }
{'spore inner membrane' }
Investigate part_of
and is_a
Relationships
Display the term
objects to which the term
object in the 18,703rd position has an “is a” relationship.
GeneontObj.terms(18703).is_a
ans = 30282
Display the term
objects to which the term
object in the 18,703rd position has a “part of” relationship.
GeneontObj.terms(18703).part_of
ans = 43931
Investigate Synonyms
Display the term
objects that are synonymous to the term
object in the third position in GeneontObj
.
synonyms = GeneontObj.terms(3).synonym
synonyms = 3×2 cell
{'alt_id' } {'GO:0019952' }
{'alt_id' } {'GO:0050876' }
{'synonym'} {'"reproductive physiological process" EXACT []'}
Display the text of the third synonym.
synonyms(3,2)
ans = 1×1 cell array
{'"reproductive physiological process" EXACT []'}
Display the term
objects that are synonymous to the term
object in the 352nd position of GeneontObj
.
GeneontObj.terms(352).synonym
ans = 1×2 cell
{'synonym'} {'"histone proline isomerization" EXACT []'}
Investigate Obsolete Status
Display the obsolete
status of the term
object in the third and seventh positions of GeneontObj
.
GeneontObj.terms(3).obsolete
ans = logical
0
GeneontObj.terms(7).obsolete
ans = logical
1
Create a cell array of logicals that list the obsolete
property for each term
in GeneontObj
.
obsolescence = get(GeneontObj.terms,'obsolete');
sum(cell2mat(obsolescence))
ans = 3718
The number of obsolete
terms is 3718.
Create a logical mask from the cell array that identifies all the nonobsolete terms.
mask = ~cell2mat(obsolescence);
Apply the logical mask to all the terms in GeneontObj
to return a structure containing only terms that are not obsolete.
nonobsolete_terms = GeneontObj.terms(mask)
43613×1 struct array with fields: id name ontology definition comment synonym is_a part_of obsolete
Version History
Introduced before R2006a
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)