Class: term
Read-only numeric value that corresponds to GO identifier of GO term
id is a property of the term class. id is
a read-only numeric value that corresponds to the GO identifier of
the GO term.
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.
Any value from 1 to N,
where N is the largest value for an identifier
of a term object in a geneont object. Use the id property
to determine GO identifiers of term objects, or to access term objects
by their GO identifier.
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.
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.
Display the GO identifier of the term object in the
183rd position in the geneont object, GeneontObj.
GeneontObj.terms(183).id ans = 207
Note
The index or position (183 in this example) of the term object in the geneont object is not the same as the GO identifier (207 in this example) for the term object. This is because there are many terms that are obsolete and are not included as term objects in the geneont object.
Format the GO identifier into a character array.
num2goid(GeneontObj.terms(183).id)
ans =
'GO:0000207'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 =
9556Use 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 =
16020Use 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 =
5628
5886
16020
19867
30673
31090
34045
34357
42175
42622
42734
44464
45211
48475
60342List the name properties of these
term objects.
get(GeneontObj(relative_ids).terms,'name')
ans =
'prospore membrane'
'plasma membrane'
'membrane'
'outer membrane'
'axolemma'
'organelle membrane'
'pre-autophagosomal structure membrane'
'photosynthetic membrane'
'nuclear envelope-endoplasmic reticulum network'
'photoreceptor outer segment membrane'
'presynaptic membrane'
'cell part'
'postsynaptic membrane'
'coated membrane'
'photoreceptor inner segment membrane'