In get_cycle_closure_dataframe() we currently enumerate cycles using:
cycles = [
c for c in nx.simple_cycles(network.to_undirected())
if len(c) <= max_cycle_length
]
During review we discussed whether nx.cycle_basis() would be more appropriate than nx.simple_cycles().
The main question is whether cycle closure analysis should use:
- all simple cycles (simple_cycles, including “super cycles”), or
- only a minimal independent basis (cycle_basis).
For now, we decided to keep simple_cycles + max_cycle_length.
Reasoning:
- Larger/super cycles may help avoid missing problematic edges due to cancellation in smaller cycles.
- Downstream edge-level diagnostics (get_cycle_closure_edge_statistics_dataframe) benefit from evaluating edges across multiple cycles.
- This aligns with observations that closing basis cycles does not necessarily imply larger cycles will also close (e.g. DOI: 10.1021/acs.jcim.5c00554).
We should revisit this if super cycles appear noisy or uninformative.
In
get_cycle_closure_dataframe()we currently enumerate cycles using:During review we discussed whether nx.cycle_basis() would be more appropriate than nx.simple_cycles().
The main question is whether cycle closure analysis should use:
For now, we decided to keep simple_cycles + max_cycle_length.
Reasoning:
We should revisit this if super cycles appear noisy or uninformative.