Class: term
Read-only Boolean value that indicates whether a GO term is obsolete
obsolete is a read-only property of the term
class. obsolete is a Boolean value that indicates
if the GO term is obsolete (1) or not obsolete
(0).
1 — Obsolete |
0 — Not obsolete |
Use the obsolete property to determine whether
a term object is obsolete, or to access or filter term objects by
obsolete value.
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 obsolete status of the term object in
the third and seventh positions in the geneont object, GO
GeneontObj.terms(3).obsolete
ans =
0
GeneontObj.terms(7).obsolete
ans =
1Tip
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 help converting the index or position number of a term object
to its GO identifier, see the term.id property.
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 structure array containing 27,786 term objects associated with the geneont object.
GeneontObj.terms
27786x1 struct array with fields:
id
name
ontology
definition
comment
synonym
is_a
part_of
obsolete
Create a cell array of logicals that list the obsolete property
for each term in the geneont object.
obsolescence = get(GeneontObj.terms,'obsolete');
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 the GeneontObj geneont
object to return a structure containing only terms that are not obsolete.
nonobsolete_terms = GeneontObj.terms(mask)
26424x1 struct array with fields:
id
name
ontology
definition
comment
synonym
is_a
part_of
obsolete
There are 26,424 terms that are not obsolete.