CLASS ndi.ontology.PATO
Location: +ndi/+ontology/PATO.m
Superclasses
Properties
none
Methods
Method | Description |
---|---|
PATO | Constructor for the PATO ontology object. |
clearCache | Clears cached ontology list JSON data and NDIC data. |
getOntologies | Returns the ontology details list from JSON cache. |
getOntologyNameFromPrefix | Extracts prefix, maps to ontology name (case-insensitive). |
getPrefixOntologyMappings | Returns the prefix->ontology mappings from JSON cache. |
lookup | Look up a term in an ontology using a prefixed string. |
lookupOBOFile | Looks up a term in a parsed OBO file. |
lookupTermOrID | Looks up a term in the PATO ontology. |
performIriLookup | PERFORMIRILOOKUP Fetches ontology term details from EBI OLS using its IRI. |
preprocessLookupInput | PREPROCESSLOOKUPINPUT Processes input for ontology lookup functions. |
searchOLSAndPerformIRILookup | SEARCHOLSANDPERFORMIRILOOKUP Searches OLS and looks up unique result by IRI. |
Methods help
PATO - Constructor for the PATO ontology object.
Implicitly calls the superclass constructor ndi.ontology().
Documentation for ndi.ontology.PATO/PATO
doc ndi.ontology.PATO
clearCache - Clears cached ontology list JSON data and NDIC data.
Help for ndi.ontology.PATO.clearCache is inherited from superclass ndi.ontology
getOntologies - Returns the ontology details list from JSON cache.
Help for ndi.ontology.PATO.getOntologies is inherited from superclass ndi.ontology
getOntologyNameFromPrefix - Extracts prefix, maps to ontology name (case-insensitive).
[...] = ndi.ontology.getOntologyNameFromPrefix(...)
Help for ndi.ontology.PATO.getOntologyNameFromPrefix is inherited from superclass ndi.ontology
getPrefixOntologyMappings - Returns the prefix->ontology mappings from JSON cache.
Help for ndi.ontology.PATO.getPrefixOntologyMappings is inherited from superclass ndi.ontology
lookup - Look up a term in an ontology using a prefixed string.
[ID, NAME, PREFIX, DEFINITION, SYNONYMS, SHORTNAME] = ndi.ontology.lookup(LOOKUPSTRING)
Looks up a term using a prefixed string (e.g., 'CL:0000000', 'OM:metre').
It identifies the ontology from the prefix using the mappings in
'ontology_list.json', instantiates the specific ndi.ontology.ONTOLOGYNAME
class (e.g., ndi.ontology.CL), and calls its lookupTermOrID instance method,
passing the remainder of the string (after the prefix).
Outputs:
ID - The canonical identifier for the term.
NAME - The primary name or label for the term.
PREFIX - The ontology prefix used in the lookup.
DEFINITION - A textual definition, if available.
SYNONYMS - A cell array of synonyms, if available.
SHORTNAME - The short name for the term.
Examples:
% Lookup neuron in Cell Ontology by ID
[id, name, prefix] = ndi.ontology.lookup('CL:0000540');
% Expected: id='CL:0000540', name='neuron', prefix='CL'
% Lookup ethanol in ChEBI by ID
[id, name, prefix] = ndi.ontology.lookup('CHEBI:16236');
% Expected: id='CHEBI:16236', name='ethanol', prefix='CHEBI'
% Lookup Heart in NCI Metathesaurus by CUI
[id, name, prefix, def] = ndi.ontology.lookup('NCIm:C0018787');
% Expected: id='C0018787', name='Heart', prefix='NCIm', def contains definition
% Lookup Aspirin in PubChem by name
[id, name, prefix] = ndi.ontology.lookup('PubChem:Aspirin');
% Expected: id='2244', name='aspirin', prefix='PubChem'
% Lookup Homo sapiens using alternative taxonomy prefix
[id, name, prefix] = ndi.ontology.lookup('taxonomy:9606');
% Expected: id='9606', name='Homo sapiens', prefix='taxonomy'
% Example of a failed lookup (non-existent term)
try
ndi.ontology.lookup('CL:NoSuchTerm');
catch ME
disp(ME.identifier); % e.g., 'ndi:ontology:lookup_CL:NotFound' or similar
disp(ME.message);
end
See also: ndi.ontology.PATO.lookupTermOrID (instance method to be overridden)
Help for ndi.ontology.PATO.lookup is inherited from superclass ndi.ontology
lookupOBOFile - Looks up a term in a parsed OBO file.
[ID, NAME, DEFINITION, SYNONYMS] = ndi.ontology.lookupOBOFile(...
OBOFILEPATH, ONTOLOGYPREFIX, TERM_TO_LOOKUP_FRAGMENT)
Parses an OBO file (if not already cached) and searches for a term.
TERM_TO_LOOKUP_FRAGMENT is the part of the term after the prefix
(e.g., '0000001' or 'some term name').
The function caches the parsed OBO data to speed up subsequent lookups
for the same file within a MATLAB session. Call ndi.ontology.clearCache()
or 'clear functions' to clear this cache.
Outputs:
ID - The full term ID (e.g., 'EMPTY:0000001').
NAME - The term's primary name.
DEFINITION - The term's definition.
SYNONYMS - A cell array of synonym strings (currently basic,
not parsing synonym types).
Throws:
ndi:ontology:lookupOBOFile:FileNotFound
ndi:ontology:lookupOBOFile:ParsingError
ndi:ontology:lookupOBOFile:InvalidInput
ndi:ontology:lookupOBOFile:TermNotFound
Help for ndi.ontology.PATO.lookupOBOFile is inherited from superclass ndi.ontology
lookupTermOrID - Looks up a term in the PATO ontology.
[ID, NAME, DEFINITION, SYNONYMS] = lookupTermOrID(OBJ, TERM_OR_ID_OR_NAME)
Overrides the base class method to provide specific lookup functionality
for the PATO ontology using the EBI OLS API via static helper methods
from the ndi.ontology base class.
The input TERM_OR_ID_OR_NAME is the part of the original lookup string
after the 'PATO:' prefix has been removed (e.g., '0000001' for an ID,
or 'color' for a name/label search).
Example Usage (after being called by ndi.ontology.lookup):
[id, name, ~, def] = ndi.ontology.lookup('PATO:0000012'); % quality
[id, name, ~, def] = ndi.ontology.lookup('PATO:color'); % color
See also: ndi.ontology.lookup (static dispatcher),
ndi.ontology.preprocessLookupInput (static helper),
ndi.ontology.searchOLSAndPerformIRILookup (static helper)
performIriLookup - PERFORMIRILOOKUP Fetches ontology term details from EBI OLS using its IRI.
Used by OLS-based lookup implementations (CL, OM, CHEBI, UBERON).
[...] = ndi.ontology.performIriLookup(...)
Help for ndi.ontology.PATO.performIriLookup is inherited from superclass ndi.ontology
preprocessLookupInput - PREPROCESSLOOKUPINPUT Processes input for ontology lookup functions.
Handles standard prefix/ID/name logic and OM-specific heuristic.
[...] = ndi.ontology.preprocessLookupInput(...)
Help for ndi.ontology.PATO.preprocessLookupInput is inherited from superclass ndi.ontology
searchOLSAndPerformIRILookup - SEARCHOLSANDPERFORMIRILOOKUP Searches OLS and looks up unique result by IRI.
Handles specific logic for non-exact label searches (needed for OM).
[...] = ndi.ontology.searchOLSAndPerformIRILookup(...)
Help for ndi.ontology.PATO.searchOLSAndPerformIRILookup is inherited from superclass ndi.ontology