tyto.endpoint
Submodules
Package Contents
Classes
Helper class that provides a standard way to create an ABC using |
|
Mixin class that provides SPARQL queries to SPARQLEndpoint and GraphEndpoint classes |
|
Helper class that provides a standard way to create an ABC using |
|
Class for issuing and handling HTTP requests |
|
Class which issues SPARQL queries to an endpoint |
|
Class for querying a local graph from a file |
|
Class which issues SPARQL queries to an endpoint |
|
Class for issuing and handling HTTP requests |
Attributes
Endpoint instance representing Ontobee. Ontobee is the default linked data server for most OBO Foundry library ontologies, but is also been used for many non-OBO ontologies. |
|
The Ontology Lookup Service (OLS) is a repository for biomedical ontologies that aims to provide a single point of access to the latest ontology versions. Hosted by the European Bioinformatics Institute |
- class tyto.endpoint.QueryBackend
Bases:
abc.ABCHelper class that provides a standard way to create an ABC using inheritance.
- abstract get_term_by_uri(self, ontology: Ontology, uri: str)
- abstract get_uri_by_term(self, ontology: Ontology, term: str)
- class tyto.endpoint.SPARQLBuilder
Mixin class that provides SPARQL queries to SPARQLEndpoint and GraphEndpoint classes
- get_term_by_uri(self, ontology, uri)
Query for a term by its URI
- Parameters
uri – The URI for the term
ontology – The Ontology to query
- Uri
URI
- Ontology
Ontology
- get_uri_by_term(self, ontology: Ontology, term: str) str
Query for the URI associated with the given an ontology term (e.g., “promoter”) :param term: The ontology term :term: str :param ontology: The ontology to query :ontology: Ontology
- is_child_of(self, ontology: Ontology, child_uri: str, parent_uri: str) bool
- is_parent_of(self, ontology: Ontology, parent_uri: str, child_uri: str) bool
- is_ancestor_of(self, ontology: Ontology, ancestor_uri: str, descendant_uri: str) bool
- is_descendant_of(self, ontology: Ontology, descendant_uri: str, ancestor_uri: str) bool
- get_ontologies(self)
- class tyto.endpoint.Endpoint(url)
Bases:
QueryBackend,abc.ABCHelper class that provides a standard way to create an ABC using inheritance.
- class tyto.endpoint.RESTEndpoint(url)
Bases:
QueryBackend,abc.ABCClass for issuing and handling HTTP requests
- _get_request(self, ontology: Ontology, request: str)
- class tyto.endpoint.SPARQLEndpoint(url)
Bases:
SPARQLBuilder,EndpointClass which issues SPARQL queries to an endpoint
- query(self, ontology, sparql, err_msg)
Issues SPARQL query
- convert(self, response)
Converts standard SPARQL query JSON into a flat list.
See https://www.w3.org/TR/2013/REC-sparql11-results-json-20130321/
- class tyto.endpoint.GraphEndpoint(file_path)
Bases:
SPARQLBuilder,EndpointClass for querying a local graph from a file
- is_loaded(self)
- load(self)
- query(self, ontology, sparql, err_msg)
- convert(self, response)
Extracts and flattens queried variables from rdflib response into a list
- class tyto.endpoint.OntobeeEndpoint
Bases:
SPARQLEndpointClass which issues SPARQL queries to an endpoint
- query(self, ontology, sparql, err_msg)
Issues SPARQL query
- class tyto.endpoint.EBIOntologyLookupServiceAPI
Bases:
RESTEndpointClass for issuing and handling HTTP requests
- _load_ontology_ids(self)
- _get_request(self, ontology: Ontology, get_request: str)
- get_term_by_uri(self, ontology: Ontology, uri: str)
- get_uri_by_term(self, ontology: Ontology, term: str)
- get_parents(self, ontology: Ontology, uri: str)
- get_children(self, ontology: Ontology, uri: str)
- get_descendants(self, ontology: Ontology, uri: str)
- get_ancestors(self, ontology: Ontology, uri: str)
- is_parent_of(self, ontology: Ontology, parent_uri: str, child_uri: str) bool
- is_child_of(self, ontology: Ontology, child_uri: str, parent_uri: str) bool
- is_descendant_of(self, ontology: Ontology, descendant_uri: str, ancestor: str) bool
- is_ancestor_of(self, ontology: Ontology, ancestor_uri: str, descendant_uri: str) bool
- get_ontologies(self)
- convert(self, response)
- query(self, query)
- tyto.endpoint.Ontobee
Endpoint instance representing Ontobee. Ontobee is the default linked data server for most OBO Foundry library ontologies, but is also been used for many non-OBO ontologies.
- tyto.endpoint.EBIOntologyLookupService
The Ontology Lookup Service (OLS) is a repository for biomedical ontologies that aims to provide a single point of access to the latest ontology versions. Hosted by the European Bioinformatics Institute