Reference

biomappings.gilda_utils Module

Utilities for generating predictions with pyobo/gilda.

Functions

append_gilda_predictions(prefix, ...[, ...])

Add gilda predictions to the Biomappings predictions.tsv file.

iter_prediction_tuples(prefix, provenance, *)

Iterate over prediction tuples for a given prefix.

filter_custom(predictions, custom_filter)

Filter out custom mappings.

filter_existing_xrefs(predictions, prefixes)

Filter predictions that match xrefs already loaded through PyOBO.

has_mapping(prefix, identifier, target_prefix)

Check if there's already a mapping available for this entity in a target namespace.

biomappings.utils Module

Utilities.

Functions

get_git_hash()

Get the git hash.

get_script_url(fname)

Get the source path for this script.

get_canonical_tuple(mapping)

Get the canonical tuple from a mapping entry.

check_valid_prefix_id(prefix, identifier)

Check the prefix/identifier pair is valid.

get_curie(prefix, identifier, *[, preferred])

Get a normalized curie from a pre-parsed prefix/identifier pair.

Classes

UnregisteredPrefix

Raised for an invalid prefix.

UnstandardizedPrefix(prefix, norm_prefix)

Raised for an unstandardized prefix.

InvalidIdentifier(prefix, identifier)

Raised for an invalid identifier.

InvalidNormIdentifier(prefix, identifier, ...)

Raised for an invalid normalized identifier.

InvalidIdentifierPattern(prefix, identifier, ...)

Raised for an identifier that doesn't match the pattern.

Class Inheritance Diagram

digraph inheritance7e00af2976 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "InvalidIdentifier" [URL="api/biomappings.utils.InvalidIdentifier.html#biomappings.utils.InvalidIdentifier",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="Raised for an invalid identifier."]; "InvalidIdentifierPattern" [URL="api/biomappings.utils.InvalidIdentifierPattern.html#biomappings.utils.InvalidIdentifierPattern",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="Raised for an identifier that doesn't match the pattern."]; "InvalidIdentifier" -> "InvalidIdentifierPattern" [arrowsize=0.5,style="setlinewidth(0.5)"]; "InvalidNormIdentifier" [URL="api/biomappings.utils.InvalidNormIdentifier.html#biomappings.utils.InvalidNormIdentifier",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="Raised for an invalid normalized identifier."]; "InvalidIdentifier" -> "InvalidNormIdentifier" [arrowsize=0.5,style="setlinewidth(0.5)"]; "UnregisteredPrefix" [URL="api/biomappings.utils.UnregisteredPrefix.html#biomappings.utils.UnregisteredPrefix",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="Raised for an invalid prefix."]; "UnstandardizedPrefix" [URL="api/biomappings.utils.UnstandardizedPrefix.html#biomappings.utils.UnstandardizedPrefix",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="Raised for an unstandardized prefix."]; }

biomappings.testing Module

Validation tests for biomappings.

Classes

IntegrityTestCase([methodName])

Data integrity tests.

PathIntegrityTestCase([methodName])

A test case that can be configured with paths.

Class Inheritance Diagram

digraph inheritance91366e06bd { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "IntegrityTestCase" [URL="api/biomappings.testing.IntegrityTestCase.html#biomappings.testing.IntegrityTestCase",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="Data integrity tests."]; "TestCase" -> "IntegrityTestCase" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PathIntegrityTestCase" [URL="api/biomappings.testing.PathIntegrityTestCase.html#biomappings.testing.PathIntegrityTestCase",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 test case that can be configured with paths."]; "IntegrityTestCase" -> "PathIntegrityTestCase" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TestCase" [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 class whose instances are single test cases."]; }

biomappings.resources Package

Biomappings resources.

Functions

load_mappings(*[, path])

Load the mappings table.

load_mappings_subset(source, target)

Get a dictionary of 1-1 mappings from the source prefix to the target prefix.

append_true_mappings(mappings, *[, sort, path])

Append new lines to the mappings table.

append_true_mapping_tuples(mappings)

Append new lines to the mappings table.

write_true_mappings(mappings, *[, path])

Write mappigns to the true mappings file.

load_false_mappings(*[, path])

Load the false mappings table.

append_false_mappings(mappings, *[, sort, path])

Append new lines to the false mappings table.

write_false_mappings(mappings, *[, path])

Write mappings to the false mappings file.

load_unsure(*[, path])

Load the unsure table.

append_unsure_mappings(mappings, *[, sort, path])

Append new lines to the "unsure" mappings table.

write_unsure_mappings(mappings, *[, path])

Write mappings to the unsure mappings file.

load_predictions(*[, path])

Load the predictions table.

append_predictions(mappings, *[, ...])

Append new lines to the predictions table.

append_prediction_tuples(prediction_tuples, *)

Append new lines to the predictions table that come as canonical tuples.

write_predictions(mappings, *[, path])

Write new content to the predictions table.

remove_mappings(mappings, mappings_to_remove)

Remove the first set of mappings from the second.

load_curators()

Load the curators table.

filter_predictions(custom_filter)

Filter all the predictions by removing what's in the custom filter then re-write.

get_curated_filter()

Get a filter over all curated mappings.

prediction_tuples_from_semra(mappings, *, ...)

Get prediction tuples from SeMRA mappings.

Classes

MappingTuple(source_prefix, source_id, ...)

A named tuple class for mappings.

PredictionTuple(source_prefix, source_id, ...)

A named tuple class for predictions.

Class Inheritance Diagram

digraph inheritance661c69021a { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "MappingTuple" [URL="api/biomappings.resources.MappingTuple.html#biomappings.resources.MappingTuple",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 named tuple class for mappings."]; "PredictionTuple" [URL="api/biomappings.resources.PredictionTuple.html#biomappings.resources.PredictionTuple",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 named tuple class for predictions."]; }