Usage
sssom_pydantic.api Module
This is a placeholder for putting the main code for your module.
Functions
|
Hash the entire SSSOM semantic mapping record. |
|
Hash a mapping into a reference. |
|
Return a triples sameness identifier. |
|
Return a mapping sameness identifier as a reference. |
|
Standardize mappings against the Bioregistry. |
Classes
|
A processed extension definition. |
|
An extension definition that can be readily dumped to SSSOM. |
|
A processed representation of a mapping set. |
|
Represents a mapping set, readily serializable for usage in SSSOM TSV. |
|
Represents metadata about a mapping tool. |
|
Represents most fields for SSSOM. |
Class Inheritance Diagram
digraph inheritancec5334dff0f { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "ABC" [URL="https://docs.python.org/3/library/abc.html#abc.ABC",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Helper class that provides a standard way to create an ABC using"]; "BaseModel" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="!!! abstract \"Usage Documentation\""]; "ExtensionDefinition" [URL="api/sssom_pydantic.api.ExtensionDefinition.html#sssom_pydantic.api.ExtensionDefinition",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A processed extension definition."]; "BaseModel" -> "ExtensionDefinition" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ExtensionDefinitionRecord" [URL="api/sssom_pydantic.api.ExtensionDefinitionRecord.html#sssom_pydantic.api.ExtensionDefinitionRecord",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="An extension definition that can be readily dumped to SSSOM."]; "BaseModel" -> "ExtensionDefinitionRecord" [arrowsize=0.5,style="setlinewidth(0.5)"]; "MappingSet" [URL="api/sssom_pydantic.api.MappingSet.html#sssom_pydantic.api.MappingSet",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A processed representation of a mapping set."]; "BaseModel" -> "MappingSet" [arrowsize=0.5,style="setlinewidth(0.5)"]; "MappingSetRecord" [URL="api/sssom_pydantic.api.MappingSetRecord.html#sssom_pydantic.api.MappingSetRecord",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Represents a mapping set, readily serializable for usage in SSSOM TSV."]; "BaseModel" -> "MappingSetRecord" [arrowsize=0.5,style="setlinewidth(0.5)"]; "MappingTool" [URL="api/sssom_pydantic.api.MappingTool.html#sssom_pydantic.api.MappingTool",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Represents metadata about a mapping tool."]; "BaseModel" -> "MappingTool" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SemanticMapping" [URL="api/sssom_pydantic.api.SemanticMapping.html#sssom_pydantic.api.SemanticMapping",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Represents most fields for SSSOM."]; "Triple" -> "SemanticMapping" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SemanticallyStandardizable" -> "SemanticMapping" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SemanticallyStandardizable" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="An object that can be standardized."]; "ABC" -> "SemanticallyStandardizable" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Triple" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="A Pydantic model for a subject-predicate-object triple."]; "BaseModel" -> "Triple" [arrowsize=0.5,style="setlinewidth(0.5)"]; }sssom_pydantic.io Module
I/O operations for SSSOM.
Functions
|
Append processed records. |
|
Append records to the end of an existing file. |
|
Lint a file. |
|
Run the formatter. |
|
Read and process SSSOM from TSV. |
|
Read and process SSSOM from TSV in an iterable way. |
|
Read SSSOM TSV into unprocessed records. |
|
Parse a record into a mapping. |
|
Parse a row from a SSSOM TSV file, unprocessed. |
|
Get a semantic mapping from a row. |
|
Construct a pandas dataframe that represents the SSSOM TSV format. |
|
Write semantic mappings as SSSOM TSV. |
|
Write SSSOM metadata for the top of a TSV. |
|
Write unprocessed records. |
Classes
|
Make a function lazily cache SSSOM. |
|
An error during SSSOM parsing and processing that causes a row to be unrecoverable. |
|
The results of reading and processing a SSSOM TSV file. |
Class Inheritance Diagram
digraph inheritancededc68d0da { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "ABC" [URL="https://docs.python.org/3/library/abc.html#abc.ABC",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Helper class that provides a standard way to create an ABC using"]; "Cached" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Caching decorator."]; "Generic" -> "Cached" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ABC" -> "Cached" [arrowsize=0.5,style="setlinewidth(0.5)"]; "CachedSemanticMappings" [URL="api/sssom_pydantic.io.CachedSemanticMappings.html#sssom_pydantic.io.CachedSemanticMappings",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Make a function lazily cache SSSOM."]; "Cached" -> "CachedSemanticMappings" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Generic" [URL="https://docs.python.org/3/library/typing.html#typing.Generic",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Abstract base class for generic types."]; "ParseError" [URL="api/sssom_pydantic.io.ParseError.html#sssom_pydantic.io.ParseError",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="An error during SSSOM parsing and processing that causes a row to be unrecoverable."]; "SemanticMappingPack" [URL="api/sssom_pydantic.io.SemanticMappingPack.html#sssom_pydantic.io.SemanticMappingPack",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="The results of reading and processing a SSSOM TSV file."]; }sssom_pydantic.models Module
Models for SSSOM.
Classes
|
Represents an SSSOM record (i.e., a row in a SSSOM TSV file) expanded with URIs. |
|
Represents an SSSOM record (i.e., a row in a SSSOM TSV file). |
Class Inheritance Diagram
digraph inheritance6e24279fca { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "BaseModel" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="!!! abstract \"Usage Documentation\""]; "ExpandedRecord" [URL="api/sssom_pydantic.models.ExpandedRecord.html#sssom_pydantic.models.ExpandedRecord",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Represents an SSSOM record (i.e., a row in a SSSOM TSV file) expanded with URIs."]; "BaseModel" -> "ExpandedRecord" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Record" [URL="api/sssom_pydantic.models.Record.html#sssom_pydantic.models.Record",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Represents an SSSOM record (i.e., a row in a SSSOM TSV file)."]; "BaseModel" -> "Record" [arrowsize=0.5,style="setlinewidth(0.5)"]; }sssom_pydantic.process Module
Utilities for working with semantic mappings.
Functions
|
Curate a mapping. |
|
Estimate the confidence of a subject-predicate-triple based on multiple evidences. |
|
Exclude negative mappings. |
|
Exclude usunre mappings. |
|
Filter by confidence. |
|
Get the canonical tuple from a mapping entry. |
|
Invert a mapping. |
|
Invert broad matches into narrow matches. |
|
Invert mappings with the given object prefix. |
|
Invert mappings with the given subject and object (SO) prefixes. |
|
Invert mappings with the given subject prefix. |
|
Invert narrow matches into broad matches. |
|
Merge manually curated mappings. |
|
Add a publication date to the mapping. |
|
Remove mappings with same S/O pairs in other given mappings. |
|
Remove redundant mappings. |
|
Review a mapping and produce a new record. |
Classes
|
An error for an invalid exists action. |
Class Inheritance Diagram
digraph inheritance1194b8ffc3 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "InvalidExistsActionError" [URL="api/sssom_pydantic.process.InvalidExistsActionError.html#sssom_pydantic.process.InvalidExistsActionError",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="An error for an invalid exists action."]; }sssom_pydantic.query Module
Tools for filtering mappings.
Functions
|
Count appearances of subjects and objects. |
|
Count subject/object prefix pairs. |
|
Count the number of unique entities appearing in the subjects and objects of mappings. |
|
Filter mappings based on a query. |
|
Get a sequence of mappings. |
|
Paginate mappings with sort, offset, and limit operations. |
|
Sort mappings. |
Classes
|
A query over semantic mappings. |