risk-network 0.0.12b5__py3-none-any.whl → 0.0.13b0__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.
- risk/__init__.py +1 -1
- risk/annotation/io.py +7 -7
- risk/neighborhoods/neighborhoods.py +2 -2
- risk/network/io.py +6 -6
- {risk_network-0.0.12b5.dist-info → risk_network-0.0.13b0.dist-info}/METADATA +4 -3
- {risk_network-0.0.12b5.dist-info → risk_network-0.0.13b0.dist-info}/RECORD +9 -9
- {risk_network-0.0.12b5.dist-info → risk_network-0.0.13b0.dist-info}/WHEEL +0 -0
- {risk_network-0.0.12b5.dist-info → risk_network-0.0.13b0.dist-info}/licenses/LICENSE +0 -0
- {risk_network-0.0.12b5.dist-info → risk_network-0.0.13b0.dist-info}/top_level.txt +0 -0
risk/__init__.py
CHANGED
risk/annotation/io.py
CHANGED
@@ -39,7 +39,7 @@ class AnnotationIO:
|
|
39
39
|
params.log_annotation(
|
40
40
|
filetype=filetype, filepath=filepath, min_nodes_per_term=min_nodes_per_term
|
41
41
|
)
|
42
|
-
self.
|
42
|
+
self._log_loading_annotation(filetype, filepath=filepath)
|
43
43
|
|
44
44
|
# Load the JSON file into a dictionary
|
45
45
|
with open(filepath, "r", encoding="utf-8") as file:
|
@@ -78,7 +78,7 @@ class AnnotationIO:
|
|
78
78
|
params.log_annotation(
|
79
79
|
filetype=filetype, filepath=filepath, min_nodes_per_term=min_nodes_per_term
|
80
80
|
)
|
81
|
-
self.
|
81
|
+
self._log_loading_annotation(filetype, filepath=filepath)
|
82
82
|
|
83
83
|
# Load the specified sheet from the Excel file
|
84
84
|
annotation = pd.read_excel(filepath, sheet_name=sheet_name)
|
@@ -120,7 +120,7 @@ class AnnotationIO:
|
|
120
120
|
params.log_annotation(
|
121
121
|
filetype=filetype, filepath=filepath, min_nodes_per_term=min_nodes_per_term
|
122
122
|
)
|
123
|
-
self.
|
123
|
+
self._log_loading_annotation(filetype, filepath=filepath)
|
124
124
|
|
125
125
|
# Load the CSV file into a dictionary
|
126
126
|
annotation_input = self._load_matrix_file(
|
@@ -158,7 +158,7 @@ class AnnotationIO:
|
|
158
158
|
params.log_annotation(
|
159
159
|
filetype=filetype, filepath=filepath, min_nodes_per_term=min_nodes_per_term
|
160
160
|
)
|
161
|
-
self.
|
161
|
+
self._log_loading_annotation(filetype, filepath=filepath)
|
162
162
|
|
163
163
|
# Load the TSV file into a dictionary
|
164
164
|
annotation_input = self._load_matrix_file(
|
@@ -193,7 +193,7 @@ class AnnotationIO:
|
|
193
193
|
filetype = "Dictionary"
|
194
194
|
# Log the loading of the annotation from the dictionary
|
195
195
|
params.log_annotation(filepath="In-memory dictionary", filetype=filetype)
|
196
|
-
self.
|
196
|
+
self._log_loading_annotation(filetype, "In-memory dictionary")
|
197
197
|
|
198
198
|
# Load the annotation as a dictionary from the provided dictionary
|
199
199
|
return load_annotation(network, content, min_nodes_per_term)
|
@@ -228,8 +228,8 @@ class AnnotationIO:
|
|
228
228
|
label_node_dict = annotation.set_index(label_colname)[nodes_colname].to_dict()
|
229
229
|
return label_node_dict
|
230
230
|
|
231
|
-
def
|
232
|
-
"""Log
|
231
|
+
def _log_loading_annotation(self, filetype: str, filepath: str = "") -> None:
|
232
|
+
"""Log the loading of annotation files.
|
233
233
|
|
234
234
|
Args:
|
235
235
|
filetype (str): The type of the file being loaded (e.g., 'Cytoscape').
|
@@ -449,7 +449,7 @@ def _prune_neighbors(
|
|
449
449
|
)
|
450
450
|
|
451
451
|
|
452
|
-
def _get_euclidean_distance(node1: Any, node2: Any, network: nx.Graph) ->
|
452
|
+
def _get_euclidean_distance(node1: Any, node2: Any, network: nx.Graph) -> float:
|
453
453
|
"""Calculate the Euclidean distance between two nodes in the network.
|
454
454
|
|
455
455
|
Args:
|
@@ -458,7 +458,7 @@ def _get_euclidean_distance(node1: Any, node2: Any, network: nx.Graph) -> np.flo
|
|
458
458
|
network (nx.Graph): The network graph containing the nodes.
|
459
459
|
|
460
460
|
Returns:
|
461
|
-
|
461
|
+
float: The Euclidean distance between the two nodes.
|
462
462
|
"""
|
463
463
|
pos1 = _get_node_position(network, node1)
|
464
464
|
pos2 = _get_node_position(network, node2)
|
risk/network/io.py
CHANGED
@@ -85,7 +85,7 @@ class NetworkIO:
|
|
85
85
|
filetype = "GPickle"
|
86
86
|
# Log the loading of the GPickle file
|
87
87
|
params.log_network(filetype=filetype, filepath=filepath)
|
88
|
-
self.
|
88
|
+
self._log_loading_network(filetype, filepath=filepath)
|
89
89
|
|
90
90
|
with open(filepath, "rb") as f:
|
91
91
|
G = pickle.load(f)
|
@@ -130,7 +130,7 @@ class NetworkIO:
|
|
130
130
|
filetype = "NetworkX"
|
131
131
|
# Log the loading of the NetworkX graph
|
132
132
|
params.log_network(filetype=filetype)
|
133
|
-
self.
|
133
|
+
self._log_loading_network(filetype)
|
134
134
|
|
135
135
|
# Important: Make a copy of the network to avoid modifying the original
|
136
136
|
network_copy = copy.deepcopy(network)
|
@@ -198,7 +198,7 @@ class NetworkIO:
|
|
198
198
|
filetype = "Cytoscape"
|
199
199
|
# Log the loading of the Cytoscape file
|
200
200
|
params.log_network(filetype=filetype, filepath=str(filepath))
|
201
|
-
self.
|
201
|
+
self._log_loading_network(filetype, filepath=filepath)
|
202
202
|
|
203
203
|
cys_files = []
|
204
204
|
tmp_dir = ".tmp_cytoscape"
|
@@ -354,7 +354,7 @@ class NetworkIO:
|
|
354
354
|
filetype = "Cytoscape JSON"
|
355
355
|
# Log the loading of the Cytoscape JSON file
|
356
356
|
params.log_network(filetype=filetype, filepath=str(filepath))
|
357
|
-
self.
|
357
|
+
self._log_loading_network(filetype, filepath=filepath)
|
358
358
|
|
359
359
|
# Load the Cytoscape JSON file
|
360
360
|
with open(filepath, "r") as f:
|
@@ -672,12 +672,12 @@ class NetworkIO:
|
|
672
672
|
|
673
673
|
return G
|
674
674
|
|
675
|
-
def
|
675
|
+
def _log_loading_network(
|
676
676
|
self,
|
677
677
|
filetype: str,
|
678
678
|
filepath: str = "",
|
679
679
|
) -> None:
|
680
|
-
"""Log the
|
680
|
+
"""Log the loading of the network with relevant parameters.
|
681
681
|
|
682
682
|
Args:
|
683
683
|
filetype (str): The type of the file being loaded (e.g., 'CSV', 'JSON').
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: risk-network
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.13b0
|
4
4
|
Summary: A Python package for biological network analysis
|
5
5
|
Author-email: Ira Horecka <ira89@icloud.com>
|
6
6
|
License: GPL-3.0-or-later
|
@@ -88,9 +88,10 @@ This figure highlights RISK’s capability to detect both established and novel
|
|
88
88
|
|
89
89
|
## Citation
|
90
90
|
|
91
|
-
If you use RISK in your research, please
|
91
|
+
If you use RISK in your research, please reference the following:
|
92
92
|
|
93
|
-
**Horecka et al.**, "RISK: a next-generation tool for biological network annotation and visualization"
|
93
|
+
**Horecka et al.**, *"RISK: a next-generation tool for biological network annotation and visualization"*, 2025.
|
94
|
+
DOI: [10.1234/zenodo.xxxxxxx](https://doi.org/10.1234/zenodo.xxxxxxx)
|
94
95
|
|
95
96
|
## Software Architecture and Implementation
|
96
97
|
|
@@ -1,8 +1,8 @@
|
|
1
|
-
risk/__init__.py,sha256=
|
1
|
+
risk/__init__.py,sha256=7SRIa1BqrKwhmaDeyiuVouldzK3W4LLNYLgF4sVfYUw,127
|
2
2
|
risk/risk.py,sha256=Wjuxob5bI70Tpz9t71i05g94AQ3qXEMjfEcm5IV9HSY,1118
|
3
3
|
risk/annotation/__init__.py,sha256=1EbGo41ClQb5ESTtitjOhrZhaLzzwr5aT-RYDX8w-h4,185
|
4
4
|
risk/annotation/annotation.py,sha256=OE859FpVnp69hDi1cN_CQqeiG0SrJ2ZCuIdQKzY-gt0,14675
|
5
|
-
risk/annotation/io.py,sha256=
|
5
|
+
risk/annotation/io.py,sha256=BF-hBSslHh6AlgL2FqVFBeH4swvVmdMYXJI0wu1W-gI,10745
|
6
6
|
risk/annotation/nltk_setup.py,sha256=14B6L56_dwIgAOC9Rl4dNd4-b-aEngUCoJP9L9kEilU,3572
|
7
7
|
risk/log/__init__.py,sha256=en-hKzuFtQWos4oZd8PxJ9u9Pe5bdihiqH9-qk_5ppw,217
|
8
8
|
risk/log/console.py,sha256=PgjyEvyhYLUSHXPUKEqOmxsDsfrjPICIgqo_cAHq0N8,4575
|
@@ -11,14 +11,14 @@ risk/neighborhoods/__init__.py,sha256=CNS0VNbh_IdxldXjDkPqeTrxgY4hqi_Tc_MTADW_tz
|
|
11
11
|
risk/neighborhoods/api.py,sha256=TXbjbHfQDi2eZeD9086BBsUjhDiJq2BNEYALiGs_rPc,23299
|
12
12
|
risk/neighborhoods/community.py,sha256=0YdTh6wgMLiGMdtlaD7Vu_uxOVoZ9vDBjxbkglkrTV8,17808
|
13
13
|
risk/neighborhoods/domains.py,sha256=9cWcGYGALcYruvAjWKztnEZlnYyT6DSoAPP6VsgA2wQ,14601
|
14
|
-
risk/neighborhoods/neighborhoods.py,sha256=
|
14
|
+
risk/neighborhoods/neighborhoods.py,sha256=ykJu2d0Z6gRCOAMyBtpWpxXQ2Dei4nOv7w3XN0LpiX8,21672
|
15
15
|
risk/neighborhoods/stats/__init__.py,sha256=1evLEAa7trCWj2DapCV4vW_f0zsyKHqTsn4--E_fDPg,306
|
16
16
|
risk/neighborhoods/stats/tests.py,sha256=Z14H8G2qHzM5AOhKqp4YfCOL_wp3QwzUzfeGQJOqTTU,12060
|
17
17
|
risk/neighborhoods/stats/permutation/__init__.py,sha256=V-uLSoi4SIPKjSRl7rhcDR4HJ4tquAn3QxNTXH9KzK8,169
|
18
18
|
risk/neighborhoods/stats/permutation/permutation.py,sha256=k9-Yw-1wWBqeD9cGcTh_d2ypqN-HzoJrcCEAR5-BK0o,10673
|
19
19
|
risk/neighborhoods/stats/permutation/test_functions.py,sha256=Wuop4WDY3foGeKp-hMGc2Gdqf85s-x9BDXGB8ifp0oE,3147
|
20
20
|
risk/network/__init__.py,sha256=C9GisdyJM7fizwUIipy1vC4lbry9ceqLn1iBcW0-mZg,34
|
21
|
-
risk/network/io.py,sha256=
|
21
|
+
risk/network/io.py,sha256=oD7jZ0qrZr78OHJHDS2hj9J5FsYpqV7vJ3TNmJfC9Cg,27903
|
22
22
|
risk/network/graph/__init__.py,sha256=iG6IlE8xtAyF6_NuCBUpsJrjrjd1vsXO1Ajsr0K8EA0,46
|
23
23
|
risk/network/graph/api.py,sha256=gXheVl1xw7vFDHOOQdRxCFwVy4ajEJ1dk4GQxm13sCI,8528
|
24
24
|
risk/network/graph/graph.py,sha256=jPNJea9JiLKedGFvSKmZ5Kf2R9go0HJkZ4wYNJwZRJI,12410
|
@@ -33,8 +33,8 @@ risk/network/plotter/network.py,sha256=c9rPQ5mjil0sxVQnprRaKMAUqT6PZmKiATWz0m-Tv
|
|
33
33
|
risk/network/plotter/plotter.py,sha256=WZcOrBW3vBQ_aLwv8c8pXJO8ZlyswHHHfEsiLxzEYaI,6121
|
34
34
|
risk/network/plotter/utils/colors.py,sha256=xZt4877ORTQqySiMh-tUGe0sXvhLbXO04iGNeBDkbbw,19144
|
35
35
|
risk/network/plotter/utils/layout.py,sha256=Lty16T-Q-oWwo9fXqm-nnS_dMS3BMhuFt4SFqxFC3Ng,3610
|
36
|
-
risk_network-0.0.
|
37
|
-
risk_network-0.0.
|
38
|
-
risk_network-0.0.
|
39
|
-
risk_network-0.0.
|
40
|
-
risk_network-0.0.
|
36
|
+
risk_network-0.0.13b0.dist-info/licenses/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
|
37
|
+
risk_network-0.0.13b0.dist-info/METADATA,sha256=VySq4M1F3ngSP-yVOii8nMjSNNktg_E1owpA5ioXmQo,6670
|
38
|
+
risk_network-0.0.13b0.dist-info/WHEEL,sha256=ooBFpIzZCPdw3uqIQsOo4qqbA4ZRPxHnOH7peeONza0,91
|
39
|
+
risk_network-0.0.13b0.dist-info/top_level.txt,sha256=NX7C2PFKTvC1JhVKv14DFlFAIFnKc6Lpsu1ZfxvQwVw,5
|
40
|
+
risk_network-0.0.13b0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|