PropertyController API Wrapper
OntologyLookup.PropertyController.onto_properties
— Methodonto_properties(ontogy_id::AbstractString;
[iri::AbstractString="",
short_from::AbstractString="",
obo_id="",
lang::AbstractString="en",
encode_iri::Bool=true])
Fetches the properties of an ontology specified by ontogy_id
.
Arguments
ontogy_id::AbstractString
: The name of the ontology.iri::AbstractString
: (optional) The IRI of the property.short_from::AbstractString
: (optional) The short form of the property.obo_id
: (optional) The OBO ID of the property.lang::AbstractString
: (optional) The language of the property.encode_iri::Bool
: (optional) Whether to encode the IRI.
Returns
terms::Dict
: A dictionary of properties, where the keys are the OBO IDs and the values areTerm
objects.
Example
ontogy_id = "duo"
iri = "http://purl.obolibrary.org/obo/BFO_0000050"
properties = onto_properties(ontogy_id; iri=iri)
See also
OntologyLookup.PropertyController.onto_property
— Methodonto_property(ontogy_id::AbstractString, iri::AbstractString; encode_iri::Bool=false)
Fetches the term with the given IRI from the specified ontology.
Arguments
ontogy_id::AbstractString
: The name of the ontology.iri::AbstractString
: The IRI (Internationalized Resource Identifier) of the term.encode_iri::Bool=false
: Whether to encode the IRI before making the request.
Returns
- If the term is found, returns a
Term
object representing the term. - If an error occurs during the request, logs the error and returns
missing
.
See also
OntologyLookup.PropertyController.roots
— Methodroots(ontogy_id::String)::Union{Vector{Term},Missing}
Fetches the root terms of the ontology specified by ontogy_id
.
Arguments
onto::String
: The name of the ontology.
Returns
- If successful, returns a vector of Terms representing the root terms of the ontology.
- If an error occurs during the API request, returns
missing
.