napistu 0.4.5__py3-none-any.whl → 0.4.7__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/network/constants.py +33 -3
- napistu/network/neighborhoods.py +430 -230
- napistu/network/ng_utils.py +7 -7
- napistu/network/paths.py +28 -18
- {napistu-0.4.5.dist-info → napistu-0.4.7.dist-info}/METADATA +1 -1
- {napistu-0.4.5.dist-info → napistu-0.4.7.dist-info}/RECORD +13 -13
- tests/test_network_neighborhoods.py +120 -21
- tests/test_network_paths.py +40 -16
- tests/test_network_precompute.py +25 -10
- {napistu-0.4.5.dist-info → napistu-0.4.7.dist-info}/WHEEL +0 -0
- {napistu-0.4.5.dist-info → napistu-0.4.7.dist-info}/entry_points.txt +0 -0
- {napistu-0.4.5.dist-info → napistu-0.4.7.dist-info}/licenses/LICENSE +0 -0
- {napistu-0.4.5.dist-info → napistu-0.4.7.dist-info}/top_level.txt +0 -0
napistu/network/constants.py
CHANGED
@@ -10,11 +10,21 @@ from napistu.constants import SBOTERM_NAMES
|
|
10
10
|
|
11
11
|
NAPISTU_GRAPH = SimpleNamespace(VERTICES="vertices", EDGES="edges", METADATA="metadata")
|
12
12
|
|
13
|
-
|
14
|
-
|
13
|
+
GRAPH_DIRECTEDNESS = SimpleNamespace(DIRECTED="directed", UNDIRECTED="undirected")
|
14
|
+
|
15
|
+
GRAPH_RELATIONSHIPS = SimpleNamespace(
|
16
|
+
ANCESTORS="ancestors",
|
17
|
+
CHILDREN="children",
|
18
|
+
DESCENDANTS="descendants",
|
19
|
+
FOCAL="focal",
|
20
|
+
PARENTS="parents",
|
15
21
|
)
|
16
22
|
|
17
|
-
NAPISTU_GRAPH_VERTICES = SimpleNamespace(
|
23
|
+
NAPISTU_GRAPH_VERTICES = SimpleNamespace(
|
24
|
+
NAME="name", # internal name
|
25
|
+
NODE_NAME="node_name", # human readable name
|
26
|
+
NODE_TYPE="node_type", # type of node (species or reaction)
|
27
|
+
)
|
18
28
|
|
19
29
|
NAPISTU_GRAPH_EDGES = SimpleNamespace(
|
20
30
|
DIRECTED="directed",
|
@@ -220,3 +230,23 @@ PARAMETRIC_NULL_DEFAULT_DISTRIBUTION = "norm"
|
|
220
230
|
MASK_KEYWORDS = SimpleNamespace(
|
221
231
|
ATTR="attr",
|
222
232
|
)
|
233
|
+
|
234
|
+
NEIGHBORHOOD_DICT_KEYS = SimpleNamespace(
|
235
|
+
GRAPH="graph",
|
236
|
+
VERTICES="vertices",
|
237
|
+
EDGES="edges",
|
238
|
+
REACTION_SOURCES="reaction_sources",
|
239
|
+
NEIGHBORHOOD_PATH_ENTITIES="neighborhood_path_entities",
|
240
|
+
)
|
241
|
+
|
242
|
+
DISTANCES = SimpleNamespace(
|
243
|
+
# core attributes of precomputed distances
|
244
|
+
SC_ID_ORIGIN="sc_id_origin",
|
245
|
+
SC_ID_DEST="sc_id_dest",
|
246
|
+
PATH_LENGTH="path_length",
|
247
|
+
PATH_UPSTREAM_WEIGHTS="path_upstream_weights",
|
248
|
+
PATH_WEIGHTS="path_weights",
|
249
|
+
# other attributes associated with paths/distances
|
250
|
+
FINAL_FROM="final_from",
|
251
|
+
FINAL_TO="final_to",
|
252
|
+
)
|