rnaglib.ged

This submodule is simply a collection of wrapper functions to invoke the above GED functions on our RNA graphs. Refer to the list below for function input parameters.

rnaglib.ged.ged(g1, g2, roots=None, upper_bound=None, timeout=None)[source]

Compute the graph edit distance on RNA graphs (default weighting scheme is adapted to RNA)

Parameters:
  • g1 – A networkx graph to compare

  • g2 – A networkx graph to compare

  • roots – Whether to match rooted subgraphs (forced pairing betweeen these nodes)

  • upper_bound – Maximum edit distance to consider.

  • timeout – Time after which we want to stop

Returns:

The GED value

rnaglib.ged.ged_approx(g1, g2, upper_bound=None)[source]

Compute a faster version of the ged on RNA graphs

Parameters:
  • g1 – A networkx graph to compare

  • g2 – A networkx graph to compare

  • upper_bound – Maximum edit distance to consider.

Returns:

The GED value

rnaglib.ged.ged(g1, g2, roots=None, upper_bound=None, timeout=None)[source]

Compute the graph edit distance on RNA graphs (default weighting scheme is adapted to RNA)

Parameters:
  • g1 – A networkx graph to compare

  • g2 – A networkx graph to compare

  • roots – Whether to match rooted subgraphs (forced pairing betweeen these nodes)

  • upper_bound – Maximum edit distance to consider.

  • timeout – Time after which we want to stop

Returns:

The GED value

rnaglib.ged.ged_approx(g1, g2, upper_bound=None)[source]

Compute a faster version of the ged on RNA graphs

Parameters:
  • g1 – A networkx graph to compare

  • g2 – A networkx graph to compare

  • upper_bound – Maximum edit distance to consider.

Returns:

The GED value