jcrozum / biobalm

The biologist's Boolean attractor landscape mapper, building Waddington landscapes from Boolean networks.
https://jcrozum.github.io/biobalm/
MIT License
2 stars 0 forks source link

pruned redundant paths in control succession search #128

Closed jcrozum closed 2 months ago

jcrozum commented 2 months ago

This improves the control algorithm and better aligns it with pystablemotifs.

github-actions[bot] commented 2 months ago

Coverage

Coverage Report
FileStmtsMissCoverMissing
biobalm
   _pint_reachability.py615018%24, 40–54, 69–93, 101–146
   control.py1492881%108, 120, 126, 130, 135, 144–160, 173, 417–436, 558, 561, 574
   interaction_graph_utils.py52688%11–13, 151–152, 222–223
   petri_net_translation.py1491292%22–26, 79, 136, 234, 308–309, 333–334, 343, 452
   space_utils.py1322085%26–28, 104–110, 133–139, 347–350, 414, 462
   succession_diagram.py4499379%6, 128, 218–223, 236, 283–290, 394–401, 418–419, 429, 435, 551, 638–644, 760, 763, 858–872, 903–921, 953, 963, 1006, 1013, 1064, 1082, 1104, 1220, 1411–1439, 1457, 1490, 1521, 1532, 1540, 1583, 1595, 1600
   symbolic_utils.py32584%10, 39–44, 100, 128
   trappist_core.py1842388%14–18, 55, 57, 92, 215, 217, 219, 254–256, 276–282, 340, 342, 372, 420, 422
biobalm/_sd_algorithms
   expand_attractor_seeds.py60788%6, 28, 42, 109–114, 119
   expand_bfs.py28196%6
   expand_dfs.py30197%6
   expand_minimal_spaces.py68691%6, 36, 49, 64, 101, 116
   expand_source_SCCs.py1111686%11–13, 50, 69, 77, 82, 103, 112, 120, 131, 140, 143, 167, 179, 242–243
   expand_source_blocks.py1231985%10, 31, 43–46, 68, 75, 83, 142, 168, 177, 208, 216–217, 221, 231, 237, 246
   expand_to_target.py31390%6, 38, 43
biobalm/_sd_attractors
   attractor_candidates.py2809168%13–15, 27–28, 94, 102, 108–109, 153, 162, 184, 219, 225–236, 255, 271–352, 357, 361, 367, 373, 388, 415, 420, 424, 430, 432–470, 543, 614–615, 716
   attractor_symbolic.py2244082%6–7, 39–40, 54–68, 77, 95, 102, 107, 112, 193, 206–210, 221, 230, 262, 298, 328–330, 349, 359–361, 371, 380, 422, 442, 449
TOTAL225442181% 

Tests Skipped Failures Errors Time
361 0 :zzz: 0 :x: 0 :fire: 1m 0s :stopwatch:
jcrozum commented 2 months ago

Just realized that some more pruning might be possible and might be necessary to get things perfectly matched up with pystablemotifs. Please hold off on merging until I've had a chance to give it more thought (tomorrow--it's late here and I'm not anywhere near 100% brainpower).

jcrozum commented 2 months ago

@daemontus I think this should resolve the main issues we discussed this morning (afternoon for you, I guess). I made the path skipping you implemented is optional, and the option isn't used anywhere (defaults to not use it). I think with your new method to merge the intervention outputs and the improved descendant checking I just added, we should resolve inconsistencies with pystablemotifs (except in cases where pystablemotifs messes up due to worse percolation, as we discussed).

daemontus commented 2 months ago

Thank you!

Your latest changes with the skip_feedforward_successions did indeed help quite a bit. We still need to prune the control strategies in the benchmark script because there are sometimes duplicates across different intervention objects. But overall, the new situation is much better.

I believe there might be another problem in pystablemotifs (I'll send more in an email), but there's probably nothing we can do with that.

daemontus commented 2 months ago

I've added the fix for "lost" stable motifs. I think we can merge this now.