Unbiased Candidate Mechanism Generation¶
An implementation of the unbiased candidate mechanism (UCM) generation workflow.
This workflow can be used to address the inconsistency in the definitions of the boundaries of pathways, mechanisms, sub-graphs, etc. in networks and systems biology that are introduced during curation due to a variety of reasons.
A simple approach for generating unbiased candidate mechanisms is to take the upstream controllers.
This module provides functions for generating sub-graphs based around a single node, most likely a biological process.
Sub-graphs induced around biological processes should prove to be sub-graphs of the NeuroMMSig/canonical mechanisms and provide an even more rich mechanism inventory.
This method has been applied in the following Jupyter Notebooks:
-
pybel_tools.generation.
remove_unweighted_leaves
(graph, key=None)[source]¶ Remove nodes that are leaves and that don’t have a weight (or other key) attribute set.
-
pybel_tools.generation.
is_unweighted_source
(graph, node, key)[source]¶ Check if the node is both a source and also has an annotation.
-
pybel_tools.generation.
get_unweighted_sources
(graph, key=None)[source]¶ Get nodes on the periphery of the sub-graph that do not have a annotation for the given key.
-
pybel_tools.generation.
remove_unweighted_sources
(graph, key=None)[source]¶ Prune unannotated nodes on the periphery of the sub-graph.
-
pybel_tools.generation.
prune_mechanism_by_data
(graph, key=None)[source]¶ Remove all leaves and source nodes that don’t have weights.
Is a thin wrapper around
remove_unweighted_leaves()
andremove_unweighted_sources()
- Parameters
Equivalent to:
>>> remove_unweighted_leaves(graph) >>> remove_unweighted_sources(graph)
- Return type
None
-
pybel_tools.generation.
generate_mechanism
(graph, node, key=None)[source]¶ Generate a mechanistic sub-graph upstream of the given node.
-
pybel_tools.generation.
generate_bioprocess_mechanisms
(graph, key=None)[source]¶ Generate a mechanistic sub-graph for each biological process in the graph using
generate_mechanism()
.