Reference
This contains several SeMRA submodules with low-level functionality. You can use these to build your own mapping processing workflows and I/O.
semra.api Module
Semantic Mapping Reasoning Assembler.
Functions
|
Apply mutations. |
|
Assemble evidences. |
|
Raise an exception if any entities appear as the subject in multiple mappings. |
|
Get a counter where the keys are the set of all prefixes in a weakly connected component. |
|
Count pairs of source/target prefixes. |
|
Deduplicate a list of evidences based on their "key" function. |
|
Filter out many to many mappings. |
|
Filter out mappings in the second set from the first set. |
|
Filter mappings below a given confidence. |
|
Filter out mappings whose subject or object are in the given list of prefixes. |
|
Filter out mappings within the same resource. |
|
Filter mappings that don't appear in the given subsets. |
|
Flip a mapping, if the relation is configured with an inversion. |
|
Create a symmetric mapping counts counter from a directed index. |
|
Index which entities in each vocabulary have been mapped. |
|
Aggregate and deduplicate evidences for each core triple. |
|
Get many-to-many mappings, disregarding predicate type. |
|
Get the set of terms appearing in each prefix. |
|
Get the priority reference from a component. |
|
Create a symmetric mapping counts counter from a directed index. |
|
Get the set of identifiers for each of the resources. |
|
Get test evidence. |
|
Get test reference(s). |
|
Convert a subset configuration dictionary into a subset artifact. |
|
Filter out mappings whose objects are not in the given list of prefixes. |
|
Filter out mappings whose subject or object are not in the given list of prefixes. |
|
Filter out mappings whose subjects are not in the given list of prefixes. |
|
Print the counts of source/target prefixes. |
|
Get a priority star graph. |
|
Remap a column of a dataframe based on priority mappings. |
|
Ensure that each identifier only appears as the subject of one mapping. |
|
Get a dictionary from source identifiers to target identifiers. |
|
Create a table of counts of source/target prefix via |
|
Get a dataframe summarizing the prefixes appearing in the mappings. |
|
Create a table of all mappings contained in an index. |
|
Convert a mapping index into a list of mapping objects. |
|
Use a priority mapping to re-write terms with priority groundings. |
|
Validate mappings against the Bioregistry and raise an error on the first invalid. |
Classes
|
Represents a mutation operation on a mapping set. |
semra.inference Module
Inference functionality for SeMRA.
Functions
|
Apply graph-based reasoning over mapping chains to infer new mappings. |
|
Upgrade database cross-references into exact matches for the given pairs. |
|
Apply generalization rules. |
|
Infer mappings with alternate predicates for the given prefix pairs. |
|
Upgrade database cross-references into exact matches for the given pairs. |
|
Extend the mapping list with flipped mappings. |
semra.rules Module
Constants and rules for inference.
Variables
A mapping from CURIEs to mapping justifications |
|
A mapping from CURIEs to reference objects for mapping predicates |
|
Which predicates are directionless |
|
A mapping of inverse relationships that can be applied when inversting mappings |
|
Rules for relaxing a more strict predicate to a more loose one, see https://mapping-commons.github.io/sssom/chaining-rules/#generalisation-rules |
|
A set of mappings that are not considered as precise |
|
A list of references that can be used as mapping justifications in SSSOM |
|
A list of mapping predicates suggested by SSSOM. |
|
Which predicates are transitive? This excludes the imprecise onces |
|
Two step chain inference rules |
semra.vocabulary Module
Vocabulary used in SeMRA.
Variables
Extends |
|
A reference to skos:broadMatch |
|
A reference to |
|
A reference to Charles Tapley Hoyt, the author of SeMRA |
|
A reference to skos:closeMatch |
|
A reference to oboInOwl:hasDbXref |
|
A reference to owl:equivalentTo |
|
A reference to skos:exactMatch |
|
A reference to |
|
A reference to |
|
A reference to |
|
A reference to |
|
A reference to skos:narrowMatch |
|
A reference to IAO:0100001 (term replaced by) |
|
A reference to rdfs:subClassOf |
|
A reference to |
semra.constants Module
Constants for SeMRA.
Variables
The prefix used in CURIEs representing evidences |
|
The prefix used in CURIEs representing mappings |
|
The prefix used in CURIEs representing mappings sets |
|
The label used for nodes representing concepts (i.e., entities) in SeMRA's Neo4j export |
|
The label used for nodes representing evidences in SeMRA's Neo4j export |
|
The label used for nodes representing mappings in SeMRA's Neo4j export |
|
The label used for nodes representing mapping sets in SeMRA's Neo4j export |