pygfa.algorithms package

Submodules

pygfa.algorithms.simple_paths module

A module rewritten using the simple_paths networkx module to provide a convenient and reusable way to specificy a custom iterator to use in the algorithm (using only algorithms for multigraphs)

The same documentation for networkx is valid using this algorithms.

pygfa.algorithms.simple_paths.all_simple_paths(gfa_, source, target, selector, edges=False, keys=True, cutoff=None)[source]

Compute the all_simple_path algorithm as described in networkx, but return the edges keys if asked and use the given selector to obtain the nodes to consider.

Parameters:
  • selector – A function or a method used to select the nodes to consider, the selector MUST give back two values at least and three values considering the keys. So the selector must be a similar networkx edges selectors (at least in behavior).
  • edges – If True return the edges key that connect each pair of nodes in the simple path, each data is given in the format (node_to, edge_that_connect_previous_to_node_to), so source node and target node will be in the form (node, None).
  • args – Optional arguments to supply to selector.

pygfa.algorithms.traversal module

pygfa.algorithms.traversal.dfs_edges(gfa_, selector, source=None, keys=False, **args)[source]

Custom dfs_edges to select custom edges while traversing.

Parameters:keys – If set return the keys of the edges of the dfs tree.

Module contents