Reference
The grounding happens via
omim_mappings(term, adapter)
Get the OMIM mappings for a term.
Example:
from oaklib import get_adapter omim_mappings("MONDO:0007566", get_adapter("sqlite:obo:mondo")) ['OMIM:132800']
Parameters:
Name | Type | Description | Default |
---|---|---|---|
term
|
str
|
The term. |
required |
adapter
|
The mondo adapter. |
required |
Returns:
Name | Type | Description |
---|---|---|
str |
List[str]
|
The OMIM mappings. |
Source code in src/malco/post_process/mondo_score_utils.py
score_grounded_result(prediction, ground_truth, mondo, cache=None)
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
The predicted Mondo is equivalent to the ground truth OMIM (via skos:exactMatches in Mondo):
score_grounded_result("MONDO:0007566", "OMIM:132800", get_adapter("sqlite:obo:mondo")) 1.0
The predicted Mondo is a disease entity that groups multiple OMIMs, one of which is the ground truth:
score_grounded_result("MONDO:0008029", "OMIM:158810", get_adapter("sqlite:obo:mondo")) 0.5
Parameters:
Name | Type | Description | Default |
---|---|---|---|
prediction
|
str
|
The prediction. |
required |
ground_truth
|
str
|
The ground truth. |
required |
mondo
|
The mondo adapter. |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
The score. |