Skip to content

Commit

Permalink
Merge branch 'analysis-first-major-run' of https://github.com/jcrozum…
Browse files Browse the repository at this point in the history
…/nfvs-motifs into basic_analysis
  • Loading branch information
kyuhyongpark committed Sep 14, 2023
2 parents e0fb2db + ed14a18 commit c6495a7
Show file tree
Hide file tree
Showing 605 changed files with 64,479 additions and 69 deletions.
27 changes: 14 additions & 13 deletions analysis/SD_analysis.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import sys

sys.path.append("..")

from biodivine_aeon import BooleanNetwork
from nfvsmotifs.SuccessionDiagram import SuccessionDiagram

import nfvsmotifs
from nfvsmotifs.SuccessionDiagram import SuccessionDiagram

LOG_LOCATION = 'SD_analysis_'+sys.argv[1].split('/')[-2]+'.csv'
LOG_LOCATION = "SD_analysis_" + sys.argv[1].split("/")[-2] + ".csv"

# Print progress and succession diagram size.
nfvsmotifs.SuccessionDiagram.DEBUG = True

NODE_LIMIT = 1_000_000
DEPTH_LIMIT = 10_000
NODE_LIMIT = 1_000
DEPTH_LIMIT = 100

# This is unfortunately necessary for PyEDA Boolean expression parser (for now).
sys.setrecursionlimit(150000)
Expand Down Expand Up @@ -40,12 +42,11 @@
print(f"motif avoidant attactors, {motif_avoidant_count}")
print(f"minimal trapspaces, {len(sd.minimal_trap_spaces())}")

log = open(LOG_LOCATION, 'a')
log.write(sys.argv[1].split('/')[-1] + ',') # model name
log.write(str(bn.num_vars()) + ',') # network size
log.write(str(len(sd)) + ',') # SD size
log.write(str(sd.depth()) + ',') # SD depth
log.write(str(attractor_count) + ',') # number of attractors
log.write(str(motif_avoidant_count) + ',') # number of motif avoidant attractors
log.write(str(len(sd.minimal_trap_spaces())) + '\n') # number of minimal trapspaces

log = open(LOG_LOCATION, "a")
log.write(sys.argv[1].split("/")[-1] + ",") # model name
log.write(str(bn.num_vars()) + ",") # network size
log.write(str(len(sd)) + ",") # SD size
log.write(str(sd.depth()) + ",") # SD depth
log.write(str(attractor_count) + ",") # number of attractors
log.write(str(motif_avoidant_count) + ",") # number of motif avoidant attractors
log.write(str(len(sd.minimal_trap_spaces())) + "\n") # number of minimal trapspaces
207 changes: 207 additions & 0 deletions analysis/SD_analysis_bbm-bnet-inputs-true.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
001.bnet,321,1,0,1,0,1
007.bnet,5,3,1,2,0,2
008.bnet,28,5,2,3,0,3
006.bnet,68,1,0,1,0,1
003.bnet,20,1,0,1,0,1
010.bnet,15,1,0,1,0,1
009.bnet,73,1,0,1,0,1
005.bnet,28,7,4,1,0,1
001.bnet,321,1,0,1,0,1
015.bnet,16,1,0,1,0,1
012.bnet,101,1,0,1,0,1
013.bnet,34,1,0,1,0,1
017.bnet,50,6,2,3,0,3
011.bnet,44,6,2,2,0,2
016.bnet,118,1,0,1,0,1
014.bnet,61,4,2,2,0,2
018.bnet,104,2,1,1,0,1
022.bnet,22,1,0,1,0,1
021.bnet,17,1,0,1,0,1
024.bnet,20,1,0,1,0,1
023.bnet,10,1,0,1,0,1
020.bnet,41,6,2,2,0,2
019.bnet,86,1,0,1,0,1
025.bnet,60,4,2,2,0,2
028.bnet,18,1,0,1,0,1
030.bnet,24,1,0,1,0,1
026.bnet,18,1,0,1,0,1
029.bnet,11,1,0,1,0,1
027.bnet,26,1,0,1,0,1
031.bnet,9,2,1,1,0,1
032.bnet,40,2,1,1,0,1
040.bnet,23,3,1,2,0,2
035.bnet,16,6,2,3,0,3
036.bnet,16,30,4,8,0,8
042.bnet,24,1,0,1,0,1
041.bnet,131,1,0,1,0,1
043.bnet,33,9,3,3,0,3
039.bnet,138,3,1,2,0,2
045.bnet,24,1,0,1,0,1
037.bnet,16,240,7,27,0,27
047.bnet,23,1,0,1,0,1
044.bnet,26,5,2,2,0,2
049.bnet,19,1,0,1,0,1
048.bnet,73,1,0,1,0,1
051.bnet,70,13,4,5,0,5
053.bnet,15,1,0,1,0,1
052.bnet,31,3,1,2,0,2
033.bnet,24,432,7,36,0,36
054.bnet,62,1,0,1,0,1
055.bnet,19,6,3,3,0,3
056.bnet,91,2,1,1,0,1
058.bnet,14,1,0,1,0,1
059.bnet,67,1,0,1,0,1
057.bnet,15,3,2,1,0,1
060.bnet,49,3,1,2,0,2
063.bnet,13,1,0,1,0,1
062.bnet,18,1,0,1,0,1
064.bnet,12,3,1,2,0,2
061.bnet,26,2,1,1,0,1
067.bnet,13,1,0,1,0,1
068.bnet,23,3,1,2,0,2
066.bnet,38,4,2,2,0,2
065.bnet,32,4,1,3,0,3
069.bnet,22,1,0,1,0,1
070.bnet,53,1,0,1,0,1
071.bnet,42,1,0,1,0,1
046.bnet,53,119,7,17,0,17
072.bnet,81,3,1,2,0,2
076.bnet,51,1,0,1,0,1
074.bnet,18,5,2,3,0,3
077.bnet,66,1,0,1,0,1
073.bnet,33,8,2,4,0,4
080.bnet,110,1,0,1,0,1
081.bnet,42,1,0,1,0,1
082.bnet,128,1,0,1,0,1
084.bnet,81,8,3,1,0,1
085.bnet,27,1,0,1,0,1
083.bnet,133,3,2,1,0,1
086.bnet,20,4,1,3,0,3
075.bnet,47,4,2,1,0,1
087.bnet,133,1,0,1,0,1
078.bnet,164,8,3,1,0,1
088.bnet,6,4,1,3,0,3
089.bnet,17,1,0,1,0,1
090.bnet,18,1,0,1,0,1
091.bnet,16,1,0,1,0,1
094.bnet,31,1,0,1,0,1
093.bnet,66,1,0,1,0,1
092.bnet,69,1,0,1,0,1
096.bnet,20,1,0,1,0,1
097.bnet,10,1,0,1,0,1
098.bnet,42,1,0,1,0,1
095.bnet,10,4,2,1,0,1
100.bnet,21,1,0,1,0,1
102.bnet,22,2,1,1,0,1
099.bnet,19,6,2,3,0,3
101.bnet,85,8,3,1,0,1
104.bnet,14,3,2,1,0,1
103.bnet,69,6,2,2,0,2
105.bnet,49,16,4,1,0,1
107.bnet,33,9,3,3,0,3
106.bnet,80,8,3,1,0,1
111.bnet,33,1,0,1,0,1
109.bnet,5,2,1,1,0,1
110.bnet,9,3,1,2,0,2
108.bnet,25,5,2,2,0,2
115.bnet,35,1,0,1,0,1
112.bnet,112,3,1,2,0,2
117.bnet,47,3,1,2,0,2
050.bnet,188,18,3,6,0,6
119.bnet,19,1,0,1,0,1
118.bnet,121,3,1,2,0,2
120.bnet,150,3,1,2,0,2
121.bnet,57,42,4,10,0,10
123.bnet,60,27,3,8,0,8
125.bnet,51,3,1,2,0,2
116.bnet,144,18,3,6,0,6
127.bnet,79,1,0,1,0,1
128.bnet,90,3,1,2,0,2
129.bnet,34,1,0,1,0,1
038.bnet,25,1809,11,22,0,22
130.bnet,77,1,0,1,0,1
126.bnet,42,162,5,24,0,24
131.bnet,21,1,0,1,0,1
124.bnet,252,3,1,2,0,2
134.bnet,38,1,0,1,0,1
133.bnet,10,9,2,4,0,4
135.bnet,30,1,0,1,0,1
136.bnet,28,2,1,1,0,1
137.bnet,82,1,0,1,0,1
132.bnet,148,3,1,2,0,2
139.bnet,19,3,1,2,0,2
138.bnet,31,1,0,1,0,1
141.bnet,45,1,0,1,0,1
140.bnet,80,9,2,4,0,4
142.bnet,29,18,3,6,0,6
145.bnet,62,1,0,1,0,1
147.bnet,16,2,1,1,0,1
148.bnet,83,2,1,1,0,1
149.bnet,14,1,0,1,0,1
150.bnet,33,12,3,5,0,5
152.bnet,53,4,2,2,0,2
153.bnet,18,2,1,1,0,1
154.bnet,21,3,1,2,0,2
151.bnet,133,4,2,2,0,2
155.bnet,71,9,2,4,0,4
156.bnet,36,9,2,4,0,4
158.bnet,7,3,1,2,0,2
157.bnet,103,1,0,1,0,1
160.bnet,92,93,6,18,0,18
161.bnet,96,1,0,1,0,1
162.bnet,18,3,1,2,0,2
163.bnet,34,3,1,2,0,2
164.bnet,24,162,5,24,0,24
165.bnet,8,3,1,2,0,2
166.bnet,19,1,0,1,0,1
167.bnet,57,9,2,4,0,4
168.bnet,13,1,0,1,0,1
169.bnet,7,1,0,1,0,1
170.bnet,7,1,0,1,0,1
171.bnet,7,4,2,2,0,2
172.bnet,7,9,2,4,0,4
173.bnet,76,3,1,2,0,2
174.bnet,19,54,4,13,0,13
175.bnet,41,77,5,15,0,15
176.bnet,49,1,0,1,0,1
177.bnet,34,3,1,2,0,2
178.bnet,48,3,1,2,0,2
179.bnet,56,1,0,1,0,1
180.bnet,12,3,1,2,0,2
181.bnet,13,1,0,1,0,1
182.bnet,14,3,2,1,0,1
183.bnet,35,6,2,2,0,2
184.bnet,6,3,2,1,0,1
185.bnet,15,7,2,3,0,3
186.bnet,10,6,2,3,0,3
187.bnet,19,6,2,3,0,3
188.bnet,37,36,4,9,0,9
189.bnet,6,3,1,2,0,2
190.bnet,37,1,0,1,0,1
191.bnet,19,3,1,2,0,2
034.bnet,23,6680,15,180,0,180
193.bnet,30,9,2,4,0,4
194.bnet,106,6,2,3,0,3
114.bnet,84,378,6,40,0,40
196.bnet,61,9,3,4,0,4
159.bnet,39,57,6,7,0,7
198.bnet,11,7,3,4,0,4
199.bnet,30,20,3,7,0,7
200.bnet,26,4,2,2,0,2
201.bnet,33,4,2,2,0,2
202.bnet,31,5,3,2,0,2
203.bnet,40,7,2,3,0,3
204.bnet,77,2,1,1,0,1
205.bnet,45,1,0,1,0,1
206.bnet,41,3,1,2,0,2
207.bnet,103,18,3,4,0,4
208.bnet,15,14,4,5,0,5
209.bnet,87,2,1,1,0,1
210.bnet,144,2,1,1,0,1
192.bnet,102,192,5,65,0,65
212.bnet,16,2,1,1,0,1
211.bnet,183,3,2,1,0,1
146.bnet,50,93,7,7,0,7
197.bnet,56,660,7,16,0,16
143.bnet,97,5832,9,216,0,216
195.bnet,216,783,8,48,0,48
Loading

1 comment on commit c6495a7

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
nfvsmotifs
   SuccessionDiagram.py154497%6–7, 208, 452
   control.py1201389%47, 56, 60, 66, 80, 89–105, 319, 334
   interaction_graph_utils.py142894%6–9, 57, 70, 95–96
   motif_avoidant.py163696%23–24, 130, 147, 184, 309
   petri_net_translation.py84693%23–24, 52, 63–64, 94
   pyeda_utils.py953464%12, 56–66, 90, 95, 98–112, 140–144
   space_utils.py118596%15–16, 198, 213, 270
   state_utils.py681282%15, 55–66, 98, 105, 114
   terminal_restriction_space.py44393%6–7, 80
   trappist_core.py1862089%10–11, 39, 41, 81, 127, 192, 194, 196, 231–233, 259, 317, 319, 349, 389, 391, 422, 451
nfvsmotifs/FVSpython3
   FVS.py481079%90–91, 97, 133, 183–189
   FVS_localsearch_10_python.py90199%179
nfvsmotifs/_sd_algorithms
   compute_attractor_seeds.py29197%6
   expand_attractor_seeds.py51492%6, 95–100
   expand_bfs.py28196%6
   expand_dfs.py30197%6
   expand_minimal_spaces.py37197%6
   expand_to_target.py30390%6, 37, 42
TOTAL161413392% 

Tests Skipped Failures Errors Time
360 0 💤 0 ❌ 0 🔥 3m 16s ⏱️

Please sign in to comment.