Expansion¶
Mutations that expand the graph.
-
pybel.struct.mutation.expansion.
expand_node_predecessors
(universe, graph, node)[source]¶ Expand around the predecessors of the given node in the result graph.
- Parameters
universe (pybel.BELGraph) – The graph containing the stuff to add
graph (pybel.BELGraph) – The graph to add stuff to
node (
BaseEntity
) – A BEL node
- Return type
None
-
pybel.struct.mutation.expansion.
expand_node_successors
(universe, graph, node)[source]¶ Expand around the successors of the given node in the result graph.
- Parameters
universe (pybel.BELGraph) – The graph containing the stuff to add
graph (pybel.BELGraph) – The graph to add stuff to
node (
BaseEntity
) – A BEL node
- Return type
None
-
pybel.struct.mutation.expansion.
expand_node_neighborhood
(universe, graph, node)[source]¶ Expand around the neighborhoods of the given node in the result graph.
Note: expands complexes’ members
- Parameters
universe (pybel.BELGraph) – The graph containing the stuff to add
graph (pybel.BELGraph) – The graph to add stuff to
node (
BaseEntity
) – A BEL node
- Return type
None
-
pybel.struct.mutation.expansion.
expand_nodes_neighborhoods
(universe, graph, nodes)[source]¶ Expand around the neighborhoods of the given node in the result graph.
- Parameters
universe (pybel.BELGraph) – The graph containing the stuff to add
graph (pybel.BELGraph) – The graph to add stuff to
nodes (
Iterable
[BaseEntity
]) – Nodes from the query graph
- Return type
None
-
pybel.struct.mutation.expansion.
expand_all_node_neighborhoods
(universe, graph, filter_pathologies=False)[source]¶ Expand the neighborhoods of all nodes in the given graph.
- Parameters
universe (pybel.BELGraph) – The graph containing the stuff to add
graph (pybel.BELGraph) – The graph to add stuff to
filter_pathologies (
bool
) – Should expansion take place around pathologies?
- Return type
None
-
pybel.struct.mutation.expansion.
expand_upstream_causal
(universe, graph)[source]¶ Add the upstream causal relations to the given sub-graph.
- Parameters
universe (pybel.BELGraph) – A BEL graph representing the universe of all knowledge
graph (pybel.BELGraph) – The target BEL graph to enrich with upstream causal controllers of contained nodes
-
pybel.struct.mutation.expansion.
expand_downstream_causal
(universe, graph)[source]¶ Add the downstream causal relations to the given sub-graph.
- Parameters
universe (pybel.BELGraph) – A BEL graph representing the universe of all knowledge
graph (pybel.BELGraph) – The target BEL graph to enrich with upstream causal controllers of contained nodes