|
29 | 29 | <img src="https://zenodo.org/badge/10987909.svg" alt="DOI"></a> |
30 | 30 | </p> |
31 | 31 |
|
32 | | -Semantic mapping reasoner and assembler |
33 | | - |
34 | | -This software provides: |
| 32 | +The Semantic Mapping Reasoner and Assembler (SeMRA) is a Python package that |
| 33 | +provides: |
35 | 34 |
|
36 | 35 | 1. An object model for semantic mappings (based on SSSOM) |
37 | 36 | 2. Functionality for assembling and reasoning over semantic mappings at scale |
@@ -84,6 +83,29 @@ go_mappings = semra.io.from_pyobo("go") |
84 | 83 | uberon_mappings = semra.io.from_bioontologies("uberon") |
85 | 84 | ``` |
86 | 85 |
|
| 86 | +Mappings can be processed, aggregated, and summarized using functions from the |
| 87 | +[`semra.api`]() submodule: |
| 88 | + |
| 89 | +```python |
| 90 | +from semra.api import filter_minimum_confidence, prioritize, project, summarize_prefixes |
| 91 | + |
| 92 | +mappings = ... |
| 93 | +mappings = filter_minimum_confidence(mappings, cutoff=0.7) |
| 94 | + |
| 95 | +# get one-to-one mappings between entities from the given prefixes |
| 96 | +chebi_to_mesh = project(mappings, source_prefix="chebi", target_prefix="mesh") |
| 97 | + |
| 98 | +# process the mappings using a graph algorithm that creates |
| 99 | +# a "star" graph for every equivalent entity, where the center |
| 100 | +# of the star is determined by the equivalent entity with the |
| 101 | +# highest priority based on the given list |
| 102 | +priority_mapping = prioritize(mappings, priority=[ |
| 103 | + "chebi", "chembl.compound", "pubchem.compound", "drugbank", |
| 104 | +]) |
| 105 | + |
| 106 | +summary_df = summarize_prefixes(mappings) |
| 107 | +``` |
| 108 | + |
87 | 109 | ## 🏞️ Landscape Analysis |
88 | 110 |
|
89 | 111 | We demonstrate using SeMRA to assess the [landscape](notebooks/landscape) of |
|
0 commit comments