Becksteinlab / kda

Python package used for the analysis of biochemical kinetic diagrams.
GNU General Public License v3.0
3 stars 1 forks source link

TST: Add test which verifies number of spanning trees using Kirchhoff's Matrix-Tree Theorem #75

Closed nawtrey closed 3 months ago

nawtrey commented 1 year ago

Description

There is currently a test which verifies the correct number of partial and directional diagrams are generated for maximally-connected graphs of various sizes, but this can be expanded to include graphs of arbitrary complexity using Kirchhoff's Theorem. The paper that inspired this can be found here. This is important because we currently only test edge cases, but it would be better to include many of the graphs we use throughout our tests and analysis. Some of this is discussed in #22.

TODO

nawtrey commented 8 months ago

It looks like this was partially addressed in commit 1db2203 (I've checked off the first task to reflect this).

While some checks were added to existing tests (3-state, 4-state, 4-state leakage, 5-state leakage, 6-state) I think it would be good to create a dedicated test for this that covers more complex models, and checks both partial diagram and directional diagram counts, since they rely on different algorithms to generate them.

nawtrey commented 8 months ago

This may warrant a new issue, but it looks like this has been implemented upstream in networkx (see here). I think once the KDA API is in a better state we will remove our version of this and just add a method that calls the networkx version.

nawtrey commented 3 months ago

I think I will close this. We already have a test test_diagram_counts that verifies the number of partial and directional diagrams for 5 different test models. If we think this is not thorough enough we can reopen later.