napistu 0.3.7__py3-none-any.whl → 0.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- napistu/__main__.py +8 -4
- napistu/constants.py +28 -35
- napistu/ingestion/napistu_edgelist.py +4 -4
- napistu/matching/interactions.py +41 -39
- napistu/modify/gaps.py +2 -1
- napistu/network/constants.py +61 -45
- napistu/network/data_handling.py +1 -1
- napistu/network/neighborhoods.py +3 -3
- napistu/network/net_create.py +440 -616
- napistu/network/net_create_utils.py +734 -0
- napistu/network/net_propagation.py +1 -1
- napistu/network/{napistu_graph_core.py → ng_core.py} +57 -15
- napistu/network/ng_utils.py +28 -21
- napistu/network/paths.py +4 -4
- napistu/network/precompute.py +35 -74
- napistu/sbml_dfs_utils.py +46 -0
- napistu/utils.py +80 -5
- {napistu-0.3.7.dist-info → napistu-0.4.0.dist-info}/METADATA +2 -2
- {napistu-0.3.7.dist-info → napistu-0.4.0.dist-info}/RECORD +34 -31
- tests/conftest.py +102 -1
- tests/test_network_data_handling.py +5 -2
- tests/test_network_net_create.py +92 -201
- tests/test_network_net_create_utils.py +538 -0
- tests/test_network_ng_core.py +19 -0
- tests/test_network_ng_utils.py +1 -1
- tests/test_network_precompute.py +4 -3
- tests/test_rpy2_callr.py +0 -1
- tests/test_rpy2_init.py +0 -1
- tests/test_sbml_dfs_utils.py +45 -0
- tests/test_utils.py +26 -2
- {napistu-0.3.7.dist-info → napistu-0.4.0.dist-info}/WHEEL +0 -0
- {napistu-0.3.7.dist-info → napistu-0.4.0.dist-info}/entry_points.txt +0 -0
- {napistu-0.3.7.dist-info → napistu-0.4.0.dist-info}/licenses/LICENSE +0 -0
- {napistu-0.3.7.dist-info → napistu-0.4.0.dist-info}/top_level.txt +0 -0
@@ -1,13 +1,13 @@
|
|
1
1
|
napistu/__init__.py,sha256=dFXAhIqlTLJMwowS4BUDT08-Vy3Q0u1L0CMCErSZT1Y,239
|
2
|
-
napistu/__main__.py,sha256=
|
2
|
+
napistu/__main__.py,sha256=xwlbh_0Ig3a-yG6BIJRiDPSN9R2HnX2pEBvlodlO6h4,29015
|
3
3
|
napistu/consensus.py,sha256=xWXiqIM6ot-SSPJZXTrVpohbINSCkZXBtRi-5REfk_g,69897
|
4
|
-
napistu/constants.py,sha256=
|
4
|
+
napistu/constants.py,sha256=CA-8OnE8LudLSML8piIdfPyRwgdp143Yh9eVwk3uLTw,13377
|
5
5
|
napistu/identifiers.py,sha256=e2-nTVzr5AINa0y1ER9218bKXyF2kAeJ9At22S4Z00o,33914
|
6
6
|
napistu/indices.py,sha256=Zjg3gE0JQ3T879lCPazYg-WXVE6hvcAr713ZKpJ32rk,9830
|
7
7
|
napistu/sbml_dfs_core.py,sha256=3Z2Kg-aVnZMGK9iK-_vztY2ORgNpta8BUMuWEZg80iE,73125
|
8
|
-
napistu/sbml_dfs_utils.py,sha256=
|
8
|
+
napistu/sbml_dfs_utils.py,sha256=hfTxPerJIKuPC_jpGRCGHE8XMagsHTEe1h2E99VEWL4,44980
|
9
9
|
napistu/source.py,sha256=UGpN70bqbC9gnKmM0ivSdQYim9hfzgABeXoQKzRr9oU,13646
|
10
|
-
napistu/utils.py,sha256=
|
10
|
+
napistu/utils.py,sha256=PEAsLn7VGN8JlNJQcAMYpjF1gr2mWmb5IqBsypP9hi0,35768
|
11
11
|
napistu/context/__init__.py,sha256=LQBEqipcHKK0E5UlDEg1ct-ymCs93IlUrUaH8BCevf0,242
|
12
12
|
napistu/context/discretize.py,sha256=Qq7zg46F_I-PvQIT2_pEDQV7YEtUQCxKoRvT5Gu9QsE,15052
|
13
13
|
napistu/context/filtering.py,sha256=l1oq-43ysSGqU9VmhTOO_pYT4DSMf20yxvktPC1MI0I,13696
|
@@ -21,7 +21,7 @@ napistu/ingestion/constants.py,sha256=9UP47VImZ11q0kz17N3EJg2155USqLewwNWyKpA-cb
|
|
21
21
|
napistu/ingestion/gtex.py,sha256=X0hSC1yrpf4xSJWFhpeNcnHwJzKDII2MvjfUqYA0JN8,3720
|
22
22
|
napistu/ingestion/hpa.py,sha256=R27ExrryKQ4Crxv9ATXmBJCa-yd01TMOrDjkeBhIQac,5054
|
23
23
|
napistu/ingestion/identifiers_etl.py,sha256=6ppDUA6lEZurdmVbiFLOUzphYbr-hndMhtqsQnq_yAc,5009
|
24
|
-
napistu/ingestion/napistu_edgelist.py,sha256=
|
24
|
+
napistu/ingestion/napistu_edgelist.py,sha256=4RLXsoIk_-Atu-Nqme_t1JpEpBET26VIY2Y_Hcd3sMw,3580
|
25
25
|
napistu/ingestion/obo.py,sha256=AQkIPWbjA464Lma0tx91JucWkIwLjC7Jgv5VHGRTDkE,9601
|
26
26
|
napistu/ingestion/psi_mi.py,sha256=5eJjm7XWogL9oTyGqR52kntHClLwLsTePKqCvUGyi-w,10111
|
27
27
|
napistu/ingestion/reactome.py,sha256=Hn9X-vDp4o_HK-OtaQvel3vJeZ8_TC1-4N2rruK9Oks,7099
|
@@ -31,7 +31,7 @@ napistu/ingestion/trrust.py,sha256=_6hIS48O3tRpMxX-FdIC57ekhCcV7J4owUzoaYnRqZo,9
|
|
31
31
|
napistu/ingestion/yeast.py,sha256=7XwdkmgOnG1MYauKSk9nSK6fHemDrtXEPcS4ebs1_so,5268
|
32
32
|
napistu/matching/__init__.py,sha256=dFXAhIqlTLJMwowS4BUDT08-Vy3Q0u1L0CMCErSZT1Y,239
|
33
33
|
napistu/matching/constants.py,sha256=j4XSOE9Bpma9F6apVJ1LijKOUPgRk8Geo_u_rvNtpSU,610
|
34
|
-
napistu/matching/interactions.py,sha256=
|
34
|
+
napistu/matching/interactions.py,sha256=NatrboXH0B7Jc2pics6mgmnVvp_bXFGBhVsYE1a-JKo,18992
|
35
35
|
napistu/matching/mount.py,sha256=8JEtiDIy7qdjWyDAs0vuVwEQkpwRf5ah4xMLZ4jKHag,19428
|
36
36
|
napistu/matching/species.py,sha256=U8OfzmDN9dMwemdnzQdV19bWfjY8MLJ9-wf83siK1bM,18888
|
37
37
|
napistu/mcp/__init__.py,sha256=EmtcdtYyfhXdxxPB5cY_pshXnFv6XZ5CtRU0JMHn3aQ,2074
|
@@ -54,20 +54,21 @@ napistu/mcp/utils.py,sha256=WB4c6s8aPZLgi_Wvhhq0DE8Cnz2QGff0V8hrF1feVRg,1296
|
|
54
54
|
napistu/modify/__init__.py,sha256=dFXAhIqlTLJMwowS4BUDT08-Vy3Q0u1L0CMCErSZT1Y,239
|
55
55
|
napistu/modify/constants.py,sha256=H6K6twzPlxt0yp6QLAxIx0Tp8YzYhtKKXPdmXi5V_QQ,3689
|
56
56
|
napistu/modify/curation.py,sha256=sQeSO53ZLdn14ww2GSKkoP0vJnDpAoSWb-YDjUf5hDQ,21743
|
57
|
-
napistu/modify/gaps.py,sha256=
|
57
|
+
napistu/modify/gaps.py,sha256=CV-bdSfanhrnCIFVWfNuQJbtjvj4hsEwheKYR-Z3tNA,26844
|
58
58
|
napistu/modify/pathwayannot.py,sha256=xuBSMDFWbg_d6-Gzv0Td3Q5nnFTa-Qzic48g1b1AZtQ,48081
|
59
59
|
napistu/modify/uncompartmentalize.py,sha256=y5LkXn5x6u80dB_McfAIh88BxZGIAVFLujkP7sPNRh0,9690
|
60
60
|
napistu/network/__init__.py,sha256=dFXAhIqlTLJMwowS4BUDT08-Vy3Q0u1L0CMCErSZT1Y,239
|
61
|
-
napistu/network/constants.py,sha256=
|
62
|
-
napistu/network/data_handling.py,sha256=
|
61
|
+
napistu/network/constants.py,sha256=LPsMtbAoier9Qor9REA7UIx7vnBtDpxMbcv3yI-c-2s,6441
|
62
|
+
napistu/network/data_handling.py,sha256=KncrAKjXI3169BgVE-SnY8FkpVF60JnUwfMHtbqvsTc,14725
|
63
63
|
napistu/network/ig_utils.py,sha256=JSlf_sZtw3DiiSIiYJ2YqJFEP4hVJMwNRox2qYTA4zY,11470
|
64
|
-
napistu/network/
|
65
|
-
napistu/network/
|
66
|
-
napistu/network/
|
67
|
-
napistu/network/net_propagation.py,sha256=
|
68
|
-
napistu/network/
|
69
|
-
napistu/network/
|
70
|
-
napistu/network/
|
64
|
+
napistu/network/neighborhoods.py,sha256=g5QeGaizSfW4nNe9YZY86g8q79EQmuvSwipaNPnOVqA,56121
|
65
|
+
napistu/network/net_create.py,sha256=Ylt4osGWPfj9MSDPy67pOTmLERGtS3cStR94UaqmXes,59082
|
66
|
+
napistu/network/net_create_utils.py,sha256=zajwaz2xAij_9fEnD77SgBw_EnNAnJ8jBCmmK2rk_bA,24672
|
67
|
+
napistu/network/net_propagation.py,sha256=S70zl0W4aYu5RPf5PZh829xT1xUyeTdi3TcIaFeYMww,4924
|
68
|
+
napistu/network/ng_core.py,sha256=dGnTUKR4WtnvaYMyIHqqF55FY4mJSa7wjA2LZ4cVB6U,11720
|
69
|
+
napistu/network/ng_utils.py,sha256=c1tHXz_JcH01D5KovNQmRLTEVxpCkCe36otULq-liz8,15579
|
70
|
+
napistu/network/paths.py,sha256=r6LVKVvX7i3ctBA5r-xvHfpH5Zsd0VDHUCtin2iag20,17453
|
71
|
+
napistu/network/precompute.py,sha256=ibL0ByY7Wp5kEfIG3LUDpQKdvAeQX0DNkT_46g2YrGc,8367
|
71
72
|
napistu/ontologies/__init__.py,sha256=dFXAhIqlTLJMwowS4BUDT08-Vy3Q0u1L0CMCErSZT1Y,239
|
72
73
|
napistu/ontologies/constants.py,sha256=GyOFvezSxDK1VigATcruTKtNhjcYaid1ggulEf_HEtQ,4345
|
73
74
|
napistu/ontologies/dogma.py,sha256=VVj6NKBgNym4SdOSu8g22OohALj7cbObhIJmdY2Sfy0,8860
|
@@ -81,9 +82,9 @@ napistu/rpy2/rids.py,sha256=AfXLTfTdonfspgAHYO0Ph7jSUWv8YuyT8x3fyLfAqc8,3413
|
|
81
82
|
napistu/scverse/__init__.py,sha256=Lgxr3iMQAkTzXE9BNz93CndNP5djzerLvmHM-D0PU3I,357
|
82
83
|
napistu/scverse/constants.py,sha256=0iAkhyJUIeFGHdLLU3fCaEU1O3Oix4qAsxr3CxGTjVs,653
|
83
84
|
napistu/scverse/loading.py,sha256=jqiE71XB-wdV50GyZrauFNY0Lai4bX9Fm2Gv80VR8t8,27016
|
84
|
-
napistu-0.
|
85
|
+
napistu-0.4.0.dist-info/licenses/LICENSE,sha256=kW8wVT__JWoHjl2BbbJDAZInWa9AxzJeR_uv6-i5x1g,1063
|
85
86
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
86
|
-
tests/conftest.py,sha256=
|
87
|
+
tests/conftest.py,sha256=t-GHb0MvSsC-MyhkFpOy2K3t5fi7eaig_Rc2xEQC-t8,9678
|
87
88
|
tests/test_consensus.py,sha256=Hzfrgp4SpkRDnEMVMD3f0UInSycndB8kKzC4wDDvRas,15076
|
88
89
|
tests/test_constants.py,sha256=gJLDv7QMeeBiiupyMazj6mumk20KWvGMgm2myHMKKfc,531
|
89
90
|
tests/test_context_discretize.py,sha256=5Mr9WqwHGYMO37M1TnMmSfC64UZ73mnoCiEM2IQHVDY,1667
|
@@ -101,33 +102,35 @@ tests/test_matching_species.py,sha256=OuUWp0-X3WYXkc-g51XyOqhp4MgO8cJvUSqt8ZvqRa
|
|
101
102
|
tests/test_mcp_config.py,sha256=GTu9vywqAHTYkolywdYS_BEIW3gBzs4A4qcneMSPpRk,7007
|
102
103
|
tests/test_mcp_documentation_utils.py,sha256=OW0N2N_2IOktbYTcCWhhWz4bANi8IB60l1q3DJi8Ra4,810
|
103
104
|
tests/test_mcp_server.py,sha256=bP3PWVQsEfX6-lAgXKP32njdg__o65n2WuLvkxTTHkQ,11215
|
104
|
-
tests/test_network_data_handling.py,sha256=
|
105
|
+
tests/test_network_data_handling.py,sha256=4aS8z2AlKkVd-JhK4BQ8fjeiW8_bJ1hZ3cc71Jh7Glk,12716
|
105
106
|
tests/test_network_ig_utils.py,sha256=Buoh570mNm5pcac3Hf6f3pevCjWfBwPfKuD8IkDLg58,2120
|
106
107
|
tests/test_network_neighborhoods.py,sha256=8BV17m5X1OUd5FwasTTYUOkNYUHDPUkxOKH_VZCsyBE,631
|
107
|
-
tests/test_network_net_create.py,sha256=
|
108
|
+
tests/test_network_net_create.py,sha256=L0U91b4jVHDuC3DFo-_BUFVuv4GuSxZuLAo7r-7EJxY,12877
|
109
|
+
tests/test_network_net_create_utils.py,sha256=0J6KIh2HBc4koFsvwMaul1QRtj5x92kR9HBdDZajnAw,18971
|
108
110
|
tests/test_network_net_propagation.py,sha256=9pKkUdduWejH4iKNCJXKFzAkdNpCfrMbiUWySgI_LH4,3244
|
109
|
-
tests/
|
111
|
+
tests/test_network_ng_core.py,sha256=w-iNBTtenennJhaLFauk952pEsk7W0-Fa8lPvIRqHyY,628
|
112
|
+
tests/test_network_ng_utils.py,sha256=QVVuRnvCRfTSIlGdwQTIF9lr0wOwoc5gGeXAUY_AdgE,713
|
110
113
|
tests/test_network_paths.py,sha256=TWZnxY5bF3m6gahcxcYJGrBIawh2-_vUcec1LyPmXV8,1686
|
111
|
-
tests/test_network_precompute.py,sha256=
|
114
|
+
tests/test_network_precompute.py,sha256=zwJrKNC3s8rIrsyAQfQMYxbl8HZXUr7u09nMJ_K8jiU,9005
|
112
115
|
tests/test_ontologies_genodexito.py,sha256=6fINyUiubHZqu7qxye09DQfJXw28ZMAJc3clPb-cCoY,2298
|
113
116
|
tests/test_ontologies_mygene.py,sha256=VkdRcKIWmcG6V-2dpfvsBiOJN5dO-j0RqZNxtJRcyBU,1583
|
114
117
|
tests/test_ontologies_renaming.py,sha256=pawp3pV1hxW8nskWc4f2YHwMUqTilEEBD2BtpcSay5Q,3839
|
115
118
|
tests/test_pathwayannot.py,sha256=bceosccNy9tgxQei_7j7ATBSSvBSxOngJvK-mAzR_K0,3312
|
116
|
-
tests/test_rpy2_callr.py,sha256=
|
117
|
-
tests/test_rpy2_init.py,sha256=
|
119
|
+
tests/test_rpy2_callr.py,sha256=V4a-QH5krgYOQRgqzksMzIkGAFjBqKOAqgprxrH6bE0,2904
|
120
|
+
tests/test_rpy2_init.py,sha256=T3gnxC1O7XNvYM2P4018ikpPPAy-kwQLm7Erj0RfA-4,5895
|
118
121
|
tests/test_sbml.py,sha256=f25zj1NogYrmLluvBDboLameTuCiQ309433Qn3iPvhg,1483
|
119
122
|
tests/test_sbml_dfs_core.py,sha256=CH5OXNSAozWTl6qBvbHfgTG0NcgdlKJ_WcG0lTYBm3k,26217
|
120
|
-
tests/test_sbml_dfs_utils.py,sha256
|
123
|
+
tests/test_sbml_dfs_utils.py,sha256=WLR-b7VQ7VW4d9rv0DePPd9l-CG-FkpsHTa3OOvrbXQ,8630
|
121
124
|
tests/test_sbo.py,sha256=x_PENFaXYsrZIzOZu9cj_Wrej7i7SNGxgBYYvcigLs0,308
|
122
125
|
tests/test_scverse_loading.py,sha256=bnU1lQSYYWhOAs0IIBoi4ZohqPokDQJ0n_rtkAfEyMU,29948
|
123
126
|
tests/test_set_coverage.py,sha256=J-6m6LuOjcQa9pxRuWglSfJk4Ltm7kt_eOrn_Q-7P6Q,1604
|
124
127
|
tests/test_source.py,sha256=hT0IlpexR5zP0OhWl5BBaho9d1aCYQlFZLwRIRRnw_Y,1969
|
125
128
|
tests/test_uncompartmentalize.py,sha256=nAk5kfAVLU9a2VWe2x2HYVcKqj-EnwmwddERIPRax8c,1289
|
126
|
-
tests/test_utils.py,sha256=
|
129
|
+
tests/test_utils.py,sha256=qPSpV-Q9b6vmdycgaDmQqtcvzKnAVnN9j5xJ9x-T6bg,23959
|
127
130
|
tests/utils.py,sha256=SoWQ_5roJteFGcMaOeEiQ5ucwq3Z2Fa3AAs9iXHTsJY,749
|
128
131
|
tests/test_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
129
|
-
napistu-0.
|
130
|
-
napistu-0.
|
131
|
-
napistu-0.
|
132
|
-
napistu-0.
|
133
|
-
napistu-0.
|
132
|
+
napistu-0.4.0.dist-info/METADATA,sha256=fejMxUkQvO_EqBaZIowvumw5KRzXsjZ9gGGX0tc-YkE,3397
|
133
|
+
napistu-0.4.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
134
|
+
napistu-0.4.0.dist-info/entry_points.txt,sha256=_QnaPOvJNA3IltxmZgWIiBoen-L1bPYX18YQfC7oJgQ,41
|
135
|
+
napistu-0.4.0.dist-info/top_level.txt,sha256=Gpvk0a_PjrtqhYcQ9IDr3zR5LqpZ-uIHidQMIpjlvhY,14
|
136
|
+
napistu-0.4.0.dist-info/RECORD,,
|
tests/conftest.py
CHANGED
@@ -17,7 +17,7 @@ from napistu.sbml_dfs_core import SBML_dfs
|
|
17
17
|
from napistu.source import Source
|
18
18
|
from napistu.ingestion.sbml import SBML
|
19
19
|
from napistu.network.net_create import process_napistu_graph
|
20
|
-
from napistu.constants import SBML_DFS
|
20
|
+
from napistu.constants import SBML_DFS, MINI_SBO_FROM_NAME, SBOTERM_NAMES
|
21
21
|
|
22
22
|
|
23
23
|
@fixture
|
@@ -139,6 +139,107 @@ def napistu_graph_undirected(sbml_dfs):
|
|
139
139
|
)
|
140
140
|
|
141
141
|
|
142
|
+
@pytest.fixture
|
143
|
+
def reaction_species_examples():
|
144
|
+
"""
|
145
|
+
Pytest fixture providing a dictionary of example reaction species DataFrames for various test cases.
|
146
|
+
"""
|
147
|
+
|
148
|
+
d = dict()
|
149
|
+
d["valid_interactor"] = pd.DataFrame(
|
150
|
+
{
|
151
|
+
SBML_DFS.SBO_TERM: [
|
152
|
+
MINI_SBO_FROM_NAME[SBOTERM_NAMES.INTERACTOR],
|
153
|
+
MINI_SBO_FROM_NAME[SBOTERM_NAMES.INTERACTOR],
|
154
|
+
],
|
155
|
+
SBML_DFS.SC_ID: ["sc1", "sc2"],
|
156
|
+
SBML_DFS.STOICHIOMETRY: [0, 0],
|
157
|
+
}
|
158
|
+
).set_index(SBML_DFS.SBO_TERM)
|
159
|
+
|
160
|
+
d["invalid_interactor"] = pd.DataFrame(
|
161
|
+
{
|
162
|
+
SBML_DFS.SBO_TERM: [
|
163
|
+
MINI_SBO_FROM_NAME[SBOTERM_NAMES.INTERACTOR],
|
164
|
+
MINI_SBO_FROM_NAME[SBOTERM_NAMES.PRODUCT],
|
165
|
+
],
|
166
|
+
SBML_DFS.SC_ID: ["sc1", "sc2"],
|
167
|
+
SBML_DFS.STOICHIOMETRY: [0, 0],
|
168
|
+
}
|
169
|
+
).set_index(SBML_DFS.SBO_TERM)
|
170
|
+
|
171
|
+
d["sub_and_prod"] = pd.DataFrame(
|
172
|
+
{
|
173
|
+
SBML_DFS.SBO_TERM: [
|
174
|
+
MINI_SBO_FROM_NAME[SBOTERM_NAMES.REACTANT],
|
175
|
+
MINI_SBO_FROM_NAME[SBOTERM_NAMES.PRODUCT],
|
176
|
+
],
|
177
|
+
SBML_DFS.SC_ID: ["sub", "prod"],
|
178
|
+
SBML_DFS.STOICHIOMETRY: [-1, 1],
|
179
|
+
}
|
180
|
+
).set_index(SBML_DFS.SBO_TERM)
|
181
|
+
|
182
|
+
d["stimulator"] = pd.DataFrame(
|
183
|
+
{
|
184
|
+
SBML_DFS.SBO_TERM: [
|
185
|
+
MINI_SBO_FROM_NAME[SBOTERM_NAMES.REACTANT],
|
186
|
+
MINI_SBO_FROM_NAME[SBOTERM_NAMES.PRODUCT],
|
187
|
+
MINI_SBO_FROM_NAME[SBOTERM_NAMES.STIMULATOR],
|
188
|
+
],
|
189
|
+
SBML_DFS.SC_ID: ["sub", "prod", "stim"],
|
190
|
+
SBML_DFS.STOICHIOMETRY: [-1, 1, 0],
|
191
|
+
}
|
192
|
+
).set_index(SBML_DFS.SBO_TERM)
|
193
|
+
|
194
|
+
d["all_entities"] = pd.DataFrame(
|
195
|
+
{
|
196
|
+
SBML_DFS.SBO_TERM: [
|
197
|
+
MINI_SBO_FROM_NAME[SBOTERM_NAMES.REACTANT],
|
198
|
+
MINI_SBO_FROM_NAME[SBOTERM_NAMES.PRODUCT],
|
199
|
+
MINI_SBO_FROM_NAME[SBOTERM_NAMES.STIMULATOR],
|
200
|
+
MINI_SBO_FROM_NAME[SBOTERM_NAMES.CATALYST],
|
201
|
+
],
|
202
|
+
SBML_DFS.SC_ID: ["sub", "prod", "stim", "cat"],
|
203
|
+
SBML_DFS.STOICHIOMETRY: [-1, 1, 0, 0],
|
204
|
+
}
|
205
|
+
).set_index(SBML_DFS.SBO_TERM)
|
206
|
+
|
207
|
+
d["no_substrate"] = pd.DataFrame(
|
208
|
+
{
|
209
|
+
SBML_DFS.SBO_TERM: [
|
210
|
+
MINI_SBO_FROM_NAME[SBOTERM_NAMES.PRODUCT],
|
211
|
+
MINI_SBO_FROM_NAME[SBOTERM_NAMES.STIMULATOR],
|
212
|
+
MINI_SBO_FROM_NAME[SBOTERM_NAMES.STIMULATOR],
|
213
|
+
MINI_SBO_FROM_NAME[SBOTERM_NAMES.INHIBITOR],
|
214
|
+
MINI_SBO_FROM_NAME[SBOTERM_NAMES.CATALYST],
|
215
|
+
],
|
216
|
+
SBML_DFS.SC_ID: ["prod", "stim1", "stim2", "inh", "cat"],
|
217
|
+
SBML_DFS.STOICHIOMETRY: [1, 0, 0, 0, 0],
|
218
|
+
}
|
219
|
+
).set_index(SBML_DFS.SBO_TERM)
|
220
|
+
|
221
|
+
d["single_species"] = pd.DataFrame(
|
222
|
+
{
|
223
|
+
SBML_DFS.SBO_TERM: [MINI_SBO_FROM_NAME[SBOTERM_NAMES.PRODUCT]],
|
224
|
+
SBML_DFS.SC_ID: ["lone_prod"],
|
225
|
+
SBML_DFS.STOICHIOMETRY: [1],
|
226
|
+
}
|
227
|
+
).set_index(SBML_DFS.SBO_TERM)
|
228
|
+
|
229
|
+
d["activator_and_inhibitor_only"] = pd.DataFrame(
|
230
|
+
{
|
231
|
+
SBML_DFS.SBO_TERM: [
|
232
|
+
MINI_SBO_FROM_NAME[SBOTERM_NAMES.STIMULATOR], # activator
|
233
|
+
MINI_SBO_FROM_NAME[SBOTERM_NAMES.INHIBITOR], # inhibitor
|
234
|
+
],
|
235
|
+
SBML_DFS.SC_ID: ["act", "inh"],
|
236
|
+
SBML_DFS.STOICHIOMETRY: [0, 0],
|
237
|
+
}
|
238
|
+
).set_index(SBML_DFS.SBO_TERM)
|
239
|
+
|
240
|
+
return d
|
241
|
+
|
242
|
+
|
142
243
|
# Define custom markers for platforms
|
143
244
|
def pytest_configure(config):
|
144
245
|
config.addinivalue_line("markers", "skip_on_windows: mark test to skip on Windows")
|
@@ -6,6 +6,7 @@ import igraph as ig
|
|
6
6
|
import pandas as pd
|
7
7
|
|
8
8
|
from napistu.network import data_handling, net_create
|
9
|
+
from napistu.network.constants import GRAPH_WIRING_APPROACHES
|
9
10
|
|
10
11
|
|
11
12
|
# Fixtures
|
@@ -226,7 +227,7 @@ def test_add_results_table_to_graph(sbml_dfs_glucose_metabolism):
|
|
226
227
|
"""Test adding results table to graph."""
|
227
228
|
# Create a test graph using create_napistu_graph
|
228
229
|
graph = net_create.create_napistu_graph(
|
229
|
-
sbml_dfs_glucose_metabolism, directed=True,
|
230
|
+
sbml_dfs_glucose_metabolism, directed=True, wiring_approach="regulatory"
|
230
231
|
)
|
231
232
|
|
232
233
|
# Add some test data to sbml_dfs
|
@@ -300,7 +301,9 @@ def test_add_graph_species_attribute(sbml_dfs_glucose_metabolism):
|
|
300
301
|
"""Test adding species attributes to graph."""
|
301
302
|
# Create a test graph using create_napistu_graph
|
302
303
|
graph = net_create.create_napistu_graph(
|
303
|
-
sbml_dfs_glucose_metabolism,
|
304
|
+
sbml_dfs_glucose_metabolism,
|
305
|
+
directed=True,
|
306
|
+
wiring_approach=GRAPH_WIRING_APPROACHES.REGULATORY,
|
304
307
|
)
|
305
308
|
|
306
309
|
# Add test data to sbml_dfs
|