get_ontology
- pyobo.get_ontology(prefix, *, force=False, rewrite=False, strict=True, version=None, robot_check=True)[source]
Get the OBO for a given graph.
- Parameters:
prefix (
str
) – The prefix of the ontology to look upversion (
Optional
[str
]) – The pre-looked-up version of the ontologyforce (
bool
) – Download the data againrewrite (
bool
) – Should the OBO cache be rewritten? Automatically set to true ifforce
is truestrict (
bool
) – Should CURIEs be treated strictly? If true, raises exceptions on invalid/malformedrobot_check (
bool
) – If set to false, will send the--check=false
command to ROBOT to disregard malformed ontology components. Necessary to load some ontologies like VO.
- Return type:
- Returns:
An OBO object
- Raises:
OnlyOWLError – If the OBO foundry only has an OWL document for this resource.
Alternate usage if you have a custom url:
>>> from pystow.utils import download >>> from pyobo import Obo, from_obo_path >>> url = ... >>> obo_path = ... >>> download(url=url, path=path) >>> obo = from_obo_path(path)