From a0bd2ee203c81b64759fee8a7c5d9c86281781ba Mon Sep 17 00:00:00 2001 From: Leonardo macOS Date: Thu, 20 Jun 2024 14:53:50 +0200 Subject: [PATCH] embellishment of docstring --- src/malco/post_process/compute_mrr.py | 2 +- src/malco/post_process/mondo_score_utils.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/malco/post_process/compute_mrr.py b/src/malco/post_process/compute_mrr.py index 9f1df265..83015d82 100644 --- a/src/malco/post_process/compute_mrr.py +++ b/src/malco/post_process/compute_mrr.py @@ -6,7 +6,7 @@ from malco.post_process.mondo_score_utils import score_grounded_result from malco.post_process.mondo_score_utils import omim_mappings from typing import List -from oaklib.interfaces import OboGraphInterface, MappingProviderInterface +from oaklib.interfaces import OboGraphInterface from oaklib import get_adapter diff --git a/src/malco/post_process/mondo_score_utils.py b/src/malco/post_process/mondo_score_utils.py index 37ddad59..72fca058 100644 --- a/src/malco/post_process/mondo_score_utils.py +++ b/src/malco/post_process/mondo_score_utils.py @@ -1,6 +1,5 @@ from oaklib.datamodels.vocabulary import IS_A -from oaklib.interfaces import MappingProviderInterface, OboGraphInterface -from oaklib import get_adapter +from oaklib.interfaces import MappingProviderInterface from typing import List from cachetools import cached, LRUCache @@ -18,6 +17,7 @@ def omim_mappings(term: str, adapter) -> List[str]: Example: + >>> from oaklib import get_adapter >>> omim_mappings("MONDO:0007566", get_adapter("sqlite:obo:mondo")) ['OMIM:132800'] @@ -41,7 +41,7 @@ def score_grounded_result(prediction: str, ground_truth: str, mondo) -> float: Score the grounded result. Exact match: - + >>> from oaklib import get_adapter >>> score_grounded_result("OMIM:132800", "OMIM:132800", get_adapter("sqlite:obo:mondo")) 1.0