risk-network 0.0.8b9__py3-none-any.whl → 0.0.8b11__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 CHANGED
@@ -7,4 +7,4 @@ RISK: RISK Infers Spatial Kinships
7
7
 
8
8
  from risk.risk import RISK
9
9
 
10
- __version__ = "0.0.8-beta.9"
10
+ __version__ = "0.0.8-beta.11"
@@ -121,7 +121,7 @@ def trim_domains_and_top_annotations(
121
121
  ].transform(lambda x: (x.rank(pct=True) * 10).apply(np.ceil).astype(int))
122
122
  # Multiply 'words' column by normalized values
123
123
  top_annotations["words"] = top_annotations.apply(
124
- lambda row: " ".join([row["words"]] * row["normalized_value"]), axis=1
124
+ lambda row: " ".join([str(row["words"])] * row["normalized_value"]), axis=1
125
125
  )
126
126
 
127
127
  # Generate domain labels
risk/network/io.py CHANGED
@@ -13,6 +13,7 @@ import zipfile
13
13
  from xml.dom import minidom
14
14
 
15
15
  import networkx as nx
16
+ import numpy as np
16
17
  import pandas as pd
17
18
 
18
19
  from risk.network.geometry import assign_edge_lengths
@@ -490,7 +491,7 @@ class NetworkIO:
490
491
  if "x" not in attrs or "y" not in attrs:
491
492
  if (
492
493
  "pos" in attrs
493
- and isinstance(attrs["pos"], (tuple, list))
494
+ and isinstance(attrs["pos"], (list, tuple, np.ndarray))
494
495
  and len(attrs["pos"]) >= 2
495
496
  ):
496
497
  attrs["x"], attrs["y"] = attrs["pos"][
@@ -462,9 +462,10 @@ class Labels:
462
462
  def calculate_distance(centroid1, centroid2):
463
463
  return np.linalg.norm(centroid1 - centroid2)
464
464
 
465
+ # Domains to plot on network
466
+ selected_domains = []
465
467
  # Find the farthest apart domains using centroids
466
468
  if remaining_domains and remaining_labels:
467
- selected_domains = []
468
469
  first_domain = next(iter(remaining_domains)) # Pick the first domain to start
469
470
  selected_domains.append(first_domain)
470
471
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: risk-network
3
- Version: 0.0.8b9
3
+ Version: 0.0.8b11
4
4
  Summary: A Python package for biological network analysis
5
5
  Author: Ira Horecka
6
6
  Author-email: Ira Horecka <ira89@icloud.com>
@@ -709,7 +709,7 @@ Requires-Dist: statsmodels
709
709
  Requires-Dist: threadpoolctl
710
710
  Requires-Dist: tqdm
711
711
 
712
- # RISK
712
+ # RISK Network
713
713
 
714
714
  <p align="center">
715
715
  <img src="https://i.imgur.com/8TleEJs.png" width="50%" />
@@ -728,8 +728,8 @@ Requires-Dist: tqdm
728
728
 
729
729
  ## Documentation and Tutorial
730
730
 
731
- - **Documentation**: Comprehensive documentation is available at [Documentation link].
732
- - **Tutorial**: An interactive Jupyter notebook tutorial can be found at [Tutorial link].
731
+ - **Documentation**: Comprehensive documentation is available [here](Documentation link).
732
+ - **Tutorial**: An interactive Jupyter notebook tutorial can be found [here](https://github.com/riskportal/network-tutorial).
733
733
  We highly recommend new users to consult the documentation and tutorial early on to fully leverage RISK's capabilities.
734
734
 
735
735
  ## Installation
@@ -753,7 +753,7 @@ pip install risk-network
753
753
 
754
754
  We applied RISK to a *Saccharomyces cerevisiae* protein–protein interaction network, revealing both established and novel functional relationships. The visualization below highlights key biological processes such as ribosomal assembly and mitochondrial organization.
755
755
 
756
- ![RISK Main Figure](https://i.imgur.com/TUVfvfH.jpeg)
756
+ ![RISK Main Figure](https://i.imgur.com/5OP3Hqe.jpeg)
757
757
 
758
758
  RISK successfully detected both known and novel functional clusters within the yeast interactome. Clusters related to Golgi transport and actin nucleation were clearly defined and closely located, showcasing RISK's ability to map well-characterized interactions. Additionally, RISK identified links between mRNA processing pathways and vesicle trafficking proteins, consistent with recent studies demonstrating the role of vesicles in mRNA localization and stability.
759
759
 
@@ -1,4 +1,4 @@
1
- risk/__init__.py,sha256=ZdYPjV9cVMzz6tSQJbYp9MnzLO53YJLS50zbeWZ1SSI,112
1
+ risk/__init__.py,sha256=ZJtZA9wcK29HLGsFPkNjrQgiIa3Le1AHM1yAgOa77WA,113
2
2
  risk/constants.py,sha256=XInRaH78Slnw_sWgAsBFbUHkyA0h0jL0DKGuQNbOvjM,550
3
3
  risk/risk.py,sha256=slJXca_a726_D7oXwe765HaKTv3ZrOvhttyrWdCGPkA,21231
4
4
  risk/annotations/__init__.py,sha256=vUpVvMRE5if01Ic8QY6M2Ae3EFGJHdugEe9PdEkAW4Y,138
@@ -9,16 +9,16 @@ risk/log/config.py,sha256=m8pzj-hN4vI_2JdJUfyOoSvzT8_lhoIfBt27sKbnOes,4535
9
9
  risk/log/params.py,sha256=DUmsqPo9hi3rQHFgLTunP14I-vVoyQSFZbx5aSYmVts,6363
10
10
  risk/neighborhoods/__init__.py,sha256=tKKEg4lsbqFukpgYlUGxU_v_9FOqK7V0uvM9T2QzoL0,206
11
11
  risk/neighborhoods/community.py,sha256=stYYBXeZlGLMV-k8ckQeIqThT6v9y-S3hETobAo9590,6817
12
- risk/neighborhoods/domains.py,sha256=Ov52EEr-tWqy96y8_0tJ9f1K8FI-8tZQxHR7a59A1k8,10738
12
+ risk/neighborhoods/domains.py,sha256=D5MUIghbwyKKCAE8PN_HXvsO9NxLTGejQmyEqetD1Bk,10743
13
13
  risk/neighborhoods/neighborhoods.py,sha256=M-wL4xB_BUTlSZg90swygO5NdrZ6hFUFqs6jsiZaqHk,18260
14
14
  risk/network/__init__.py,sha256=iEPeJdZfqp0toxtbElryB8jbz9_t_k4QQ3iDvKE8C_0,126
15
15
  risk/network/geometry.py,sha256=H1yGVVqgbfpzBzJwEheDLfvGLSA284jGQQTn612L4Vc,6759
16
16
  risk/network/graph.py,sha256=EwD4-1THC5YNdP6PY01Oe35k2QYYqtZpxWraPVH6wa4,16426
17
- risk/network/io.py,sha256=kY7HqmL3wa1NnqHu61_G8IpT21qpBijpAZ4ixmsseJA,22911
17
+ risk/network/io.py,sha256=u0PPcKjp6Xze--7eDOlvalYkjQ9S2sjiC-ac2476PUI,22942
18
18
  risk/network/plot/__init__.py,sha256=MfmaXJgAZJgXZ2wrhK8pXwzETlcMaLChhWXKAozniAo,98
19
19
  risk/network/plot/canvas.py,sha256=-Y2shCy4Udp-stB9tBXGZRTASQZiv8RVqVcQ5lBhVu0,10291
20
20
  risk/network/plot/contour.py,sha256=YPG8Uz0VlJ4skLdGaTH_FmQN6A_ArK8XSTNo1LzkSws,14276
21
- risk/network/plot/labels.py,sha256=o_V_eWQZB_otjXpw6aAwEPp1Uu-auQNcxQYpGBOL7uU,40777
21
+ risk/network/plot/labels.py,sha256=MXUo5F5H1ynzEBkrh5XKE-COLuZ-4LhSxiUvkXSZKYQ,40810
22
22
  risk/network/plot/network.py,sha256=83ZXjGGrgRprWvDldWfhRe6SFXTv_QoI20OWzyEmVJU,12593
23
23
  risk/network/plot/plotter.py,sha256=rQV4Db6Ud86FJm11uaBvgSuzpmGsrZxnsRnUKjg6w84,5572
24
24
  risk/network/plot/utils.py,sha256=jZgI8EysSjviQmdYAceZk2MwJXcdeFAkYp-odZNqV0k,6316
@@ -29,8 +29,8 @@ risk/stats/stats.py,sha256=kvShov-94W6ffgDUTb522vB9hDJQSyTsYif_UIaFfSM,7059
29
29
  risk/stats/permutation/__init__.py,sha256=neJp7FENC-zg_CGOXqv-iIvz1r5XUKI9Ruxhmq7kDOI,105
30
30
  risk/stats/permutation/permutation.py,sha256=D84Rcpt6iTQniK0PfQGcw9bLcHbMt9p-ARcurUnIXZQ,10095
31
31
  risk/stats/permutation/test_functions.py,sha256=lftOude6hee0pyR80HlBD32522JkDoN5hrKQ9VEbuoY,2345
32
- risk_network-0.0.8b9.dist-info/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
33
- risk_network-0.0.8b9.dist-info/METADATA,sha256=Sq_d-xGJT_RHwo6lxwl0s9ydoIeNTRW-1vrG1V-NknA,47450
34
- risk_network-0.0.8b9.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
35
- risk_network-0.0.8b9.dist-info/top_level.txt,sha256=NX7C2PFKTvC1JhVKv14DFlFAIFnKc6Lpsu1ZfxvQwVw,5
36
- risk_network-0.0.8b9.dist-info/RECORD,,
32
+ risk_network-0.0.8b11.dist-info/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
33
+ risk_network-0.0.8b11.dist-info/METADATA,sha256=nlUZJH0fpHPUq9lgGvlNJY0Ibf5QBLYoQ6WB6dlGqNc,47498
34
+ risk_network-0.0.8b11.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
35
+ risk_network-0.0.8b11.dist-info/top_level.txt,sha256=NX7C2PFKTvC1JhVKv14DFlFAIFnKc6Lpsu1ZfxvQwVw,5
36
+ risk_network-0.0.8b11.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.1.0)
2
+ Generator: setuptools (75.2.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5