Canonicalizer
- class pyobo.Canonicalizer(graph, priority=None, cutoff=5)[source]
Bases:
object
Wraps a graph and priority list to allow getting the best identifier.
Attributes Summary
Longest length paths allowed
A list of prefixes.
Methods Summary
all_shortest_paths
(source_curie, target_curie)Get all shortest paths between the two entities.
canonicalize
(curie)Get the best CURIE from the given CURIE.
from_df
(df)Instantiate from a dataframe.
get_default
([priority])Get the default canonicalizer.
get_flat_mapping
([use_tqdm])Get a canonical mapping from all nodes to their canonical CURIEs.
iterate_flat_mapping
([use_tqdm])Iterate over the canonical mapping from all nodes to their canonical CURIEs.
single_source_shortest_path
(curie[, cutoff])Get all shortest paths between given entity and its equivalent entities.
Attributes Documentation
-
priority:
Optional
[List
[str
]] = None A list of prefixes. The ones with the lower index are higher priority
Methods Documentation
- all_shortest_paths(source_curie, target_curie)[source]
Get all shortest paths between the two entities.
- get_flat_mapping(use_tqdm=True)[source]
Get a canonical mapping from all nodes to their canonical CURIEs.
-
priority: