risk-network 0.0.6b0__py3-none-any.whl → 0.0.6b2__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/annotations/io.py +15 -3
- risk/neighborhoods/community.py +7 -3
- risk/neighborhoods/neighborhoods.py +2 -2
- risk/network/graph.py +26 -21
- risk/network/io.py +11 -0
- risk/network/plot.py +430 -202
- risk/risk.py +6 -18
- {risk_network-0.0.6b0.dist-info → risk_network-0.0.6b2.dist-info}/METADATA +1 -1
- {risk_network-0.0.6b0.dist-info → risk_network-0.0.6b2.dist-info}/RECORD +13 -13
- {risk_network-0.0.6b0.dist-info → risk_network-0.0.6b2.dist-info}/LICENSE +0 -0
- {risk_network-0.0.6b0.dist-info → risk_network-0.0.6b2.dist-info}/WHEEL +0 -0
- {risk_network-0.0.6b0.dist-info → risk_network-0.0.6b2.dist-info}/top_level.txt +0 -0
risk/risk.py
CHANGED
@@ -3,7 +3,7 @@ risk/risk
|
|
3
3
|
~~~~~~~~~
|
4
4
|
"""
|
5
5
|
|
6
|
-
from typing import Any, Dict
|
6
|
+
from typing import Any, Dict, Tuple
|
7
7
|
|
8
8
|
import networkx as nx
|
9
9
|
import numpy as np
|
@@ -114,6 +114,7 @@ class RISK(NetworkIO, AnnotationsIO):
|
|
114
114
|
max_workers=max_workers,
|
115
115
|
)
|
116
116
|
|
117
|
+
# Return the computed neighborhood significance
|
117
118
|
return neighborhood_significance
|
118
119
|
|
119
120
|
def load_neighborhoods_by_fisher_exact(
|
@@ -169,6 +170,7 @@ class RISK(NetworkIO, AnnotationsIO):
|
|
169
170
|
max_workers=max_workers,
|
170
171
|
)
|
171
172
|
|
173
|
+
# Return the computed neighborhood significance
|
172
174
|
return neighborhood_significance
|
173
175
|
|
174
176
|
def load_neighborhoods_by_hypergeom(
|
@@ -224,6 +226,7 @@ class RISK(NetworkIO, AnnotationsIO):
|
|
224
226
|
max_workers=max_workers,
|
225
227
|
)
|
226
228
|
|
229
|
+
# Return the computed neighborhood significance
|
227
230
|
return neighborhood_significance
|
228
231
|
|
229
232
|
def load_graph(
|
@@ -347,12 +350,8 @@ class RISK(NetworkIO, AnnotationsIO):
|
|
347
350
|
def load_plotter(
|
348
351
|
self,
|
349
352
|
graph: NetworkGraph,
|
350
|
-
figsize:
|
353
|
+
figsize: Tuple = (10, 10),
|
351
354
|
background_color: str = "white",
|
352
|
-
plot_outline: bool = True,
|
353
|
-
outline_color: str = "black",
|
354
|
-
outline_scale: float = 1.00,
|
355
|
-
linestyle: str = "dashed",
|
356
355
|
) -> NetworkPlotter:
|
357
356
|
"""Get a NetworkPlotter object for plotting.
|
358
357
|
|
@@ -360,10 +359,6 @@ class RISK(NetworkIO, AnnotationsIO):
|
|
360
359
|
graph (NetworkGraph): The graph to plot.
|
361
360
|
figsize (tuple, optional): Size of the figure. Defaults to (10, 10).
|
362
361
|
background_color (str, optional): Background color of the plot. Defaults to "white".
|
363
|
-
plot_outline (bool, optional): Whether to plot the network outline. Defaults to True.
|
364
|
-
outline_color (str, optional): Color of the outline. Defaults to "black".
|
365
|
-
outline_scale (float, optional): Scaling factor for the outline. Defaults to 1.00.
|
366
|
-
linestyle (str): Line style for the network perimeter circle (e.g., dashed, solid). Defaults to "dashed".
|
367
362
|
|
368
363
|
Returns:
|
369
364
|
NetworkPlotter: A NetworkPlotter object configured with the given parameters.
|
@@ -373,10 +368,6 @@ class RISK(NetworkIO, AnnotationsIO):
|
|
373
368
|
params.log_plotter(
|
374
369
|
figsize=figsize,
|
375
370
|
background_color=background_color,
|
376
|
-
plot_outline=plot_outline,
|
377
|
-
outline_color=outline_color,
|
378
|
-
outline_scale=outline_scale,
|
379
|
-
linestyle=linestyle,
|
380
371
|
)
|
381
372
|
|
382
373
|
# Initialize and return a NetworkPlotter object
|
@@ -384,10 +375,6 @@ class RISK(NetworkIO, AnnotationsIO):
|
|
384
375
|
graph,
|
385
376
|
figsize=figsize,
|
386
377
|
background_color=background_color,
|
387
|
-
plot_outline=plot_outline,
|
388
|
-
outline_color=outline_color,
|
389
|
-
outline_scale=outline_scale,
|
390
|
-
linestyle=linestyle,
|
391
378
|
)
|
392
379
|
|
393
380
|
def _load_neighborhoods(
|
@@ -430,6 +417,7 @@ class RISK(NetworkIO, AnnotationsIO):
|
|
430
417
|
random_seed=random_seed,
|
431
418
|
)
|
432
419
|
|
420
|
+
# Return the computed neighborhoods
|
433
421
|
return neighborhoods
|
434
422
|
|
435
423
|
def _define_top_annotations(
|
@@ -1,21 +1,21 @@
|
|
1
|
-
risk/__init__.py,sha256=
|
1
|
+
risk/__init__.py,sha256=Gxy0lKfxRz2r__O9V8E-JuEVysqWPz04bTIkWmP48Oc,112
|
2
2
|
risk/constants.py,sha256=XInRaH78Slnw_sWgAsBFbUHkyA0h0jL0DKGuQNbOvjM,550
|
3
|
-
risk/risk.py,sha256=
|
3
|
+
risk/risk.py,sha256=PONl5tzN5DSVUf4MgczfOvzGV-5JoAOLTQ6YWl10mZ8,20697
|
4
4
|
risk/annotations/__init__.py,sha256=vUpVvMRE5if01Ic8QY6M2Ae3EFGJHdugEe9PdEkAW4Y,138
|
5
5
|
risk/annotations/annotations.py,sha256=DRUTdGzMdqo62NWSapBUksbvPr9CrzD76qtOcxeNKmo,10554
|
6
|
-
risk/annotations/io.py,sha256=
|
6
|
+
risk/annotations/io.py,sha256=qPrYgOn9-znCorHO_CWrkMW8N3s0-8ze65SvvQ5fuxo,8168
|
7
7
|
risk/log/__init__.py,sha256=xuLImfxFlKpnVhzi_gDYlr2_c9cLkrw2c_3iEsXb1as,107
|
8
8
|
risk/log/console.py,sha256=im9DRExwf6wHlcn9fewoDcKIpo3vPcorZIaNAl-0csY,355
|
9
9
|
risk/log/params.py,sha256=Tbb-sovFTptGBqPDKafUA8KOpby4zFObutAT_Iti1hE,6302
|
10
10
|
risk/neighborhoods/__init__.py,sha256=tKKEg4lsbqFukpgYlUGxU_v_9FOqK7V0uvM9T2QzoL0,206
|
11
|
-
risk/neighborhoods/community.py,sha256=
|
11
|
+
risk/neighborhoods/community.py,sha256=7ebo1Q5KokSQISnxZIh2SQxsKXdXm8aVkp-h_DiQ3K0,6818
|
12
12
|
risk/neighborhoods/domains.py,sha256=HwuChmZH0RGD9eQOvk2-ezQDJRUHHn93vhVgHb-kX6I,10192
|
13
|
-
risk/neighborhoods/neighborhoods.py,sha256=
|
13
|
+
risk/neighborhoods/neighborhoods.py,sha256=sHmjFFl2U5qV9YbQCRbpbI36j7dS7IFfFwwRb1_-AuM,13945
|
14
14
|
risk/network/__init__.py,sha256=iEPeJdZfqp0toxtbElryB8jbz9_t_k4QQ3iDvKE8C_0,126
|
15
15
|
risk/network/geometry.py,sha256=H1yGVVqgbfpzBzJwEheDLfvGLSA284jGQQTn612L4Vc,6759
|
16
|
-
risk/network/graph.py,sha256=
|
17
|
-
risk/network/io.py,sha256=
|
18
|
-
risk/network/plot.py,sha256=
|
16
|
+
risk/network/graph.py,sha256=DhfNw2cBD238Kz0X1OSr5VLTW9h1n4cXvqUObxB4CAs,12892
|
17
|
+
risk/network/io.py,sha256=gG50kOknO-D3HkW1HsbHMkTMvjUtn3l4W4Jwd-rXNr8,21202
|
18
|
+
risk/network/plot.py,sha256=QItILQH9eUEofA4ui0WtuSaCtz63GNJgxwCGQwbd1lU,53867
|
19
19
|
risk/stats/__init__.py,sha256=e-BE_Dr_jgiK6hKM-T-tlG4yvHnId8e5qjnM0pdwNVc,230
|
20
20
|
risk/stats/fisher_exact.py,sha256=-bPwzu76-ob0HzrTV20mXUTot7v-MLuqFaAoab-QxPg,4966
|
21
21
|
risk/stats/hypergeom.py,sha256=lrIFdhCWRjvM4apYw1MlOKqT_IY5OjtCwrjdtJdt6Tg,4954
|
@@ -23,8 +23,8 @@ risk/stats/stats.py,sha256=kvShov-94W6ffgDUTb522vB9hDJQSyTsYif_UIaFfSM,7059
|
|
23
23
|
risk/stats/permutation/__init__.py,sha256=neJp7FENC-zg_CGOXqv-iIvz1r5XUKI9Ruxhmq7kDOI,105
|
24
24
|
risk/stats/permutation/permutation.py,sha256=qLWdwxEY6nmkYPxpM8HLDcd2mbqYv9Qr7CKtJvhLqIM,9220
|
25
25
|
risk/stats/permutation/test_functions.py,sha256=HuDIM-V1jkkfE1rlaIqrWWBSKZt3dQ1f-YEDjWpnLSE,2343
|
26
|
-
risk_network-0.0.
|
27
|
-
risk_network-0.0.
|
28
|
-
risk_network-0.0.
|
29
|
-
risk_network-0.0.
|
30
|
-
risk_network-0.0.
|
26
|
+
risk_network-0.0.6b2.dist-info/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
|
27
|
+
risk_network-0.0.6b2.dist-info/METADATA,sha256=dri96kn6JF3ZK04yUukO8km6vCMhs09S-vpAIYS8QQg,43142
|
28
|
+
risk_network-0.0.6b2.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
|
29
|
+
risk_network-0.0.6b2.dist-info/top_level.txt,sha256=NX7C2PFKTvC1JhVKv14DFlFAIFnKc6Lpsu1ZfxvQwVw,5
|
30
|
+
risk_network-0.0.6b2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|