kazu.steps.linking.post_processing.xref_manager¶
Functions
|
Classes
A CrossReferenceManager that uses the EBI OXO service to identify cross- references. |
- class kazu.steps.linking.post_processing.xref_manager.CrossReferenceManager[source]¶
Bases:
ABC
- __init__(source_to_parser_metadata_lookup, path)[source]¶
- Parameters:
source_to_parser_metadata_lookup (dict[str, str]) – when producing cross-referenced instances of Mapping, we need a reference in the MetadataDatabase to the target ontology, in order to look up the default label info etc. This lookup dict tells the cross reference manager what underlying parser it should use for a given source, since different parsers may hold sub sets or supersets of ids of each other. For example, a MedDRA hit might map to specific MONDO id. Since MONDO ids are held in both OpenTargetsDiseaseOntologyParser and MondoOntologyParser, we need to specify which one we want to use to generate the mapping
path (Path) – path to cross ref mapping resources required by this manager
- class kazu.steps.linking.post_processing.xref_manager.OxoCrossReferenceManager[source]¶
Bases:
CrossReferenceManager
A CrossReferenceManager that uses the EBI OXO service to identify cross- references.
Downloads a set of cross-references directly from EBI, and caches locally
- __init__(source_to_parser_metadata_lookup, path, oxo_kazu_name_mapping, uri_prefixes, oxo_query)[source]¶
- Parameters:
path (Path)
oxo_kazu_name_mapping (dict[str, str]) – mapping of OXO source names to Kazu names, to covert OXO format to Kazu. If not specified, the OXO version will be used
uri_prefixes (dict[str, str]) – mapping of KAZU sources to URI prefixes, to correctly reconstruct ids. If not specified, no prefix will be used
oxo_query (dict[str, list[str]]) – mapping of OXO source to target sources that will be used to construct the OXO API request
- headers = {'Accept': 'application/json', 'Content-Type': 'application/json'}¶
- oxo_url = 'https://www.ebi.ac.uk/spot/oxo/api/search'¶