risk-network 0.0.12b5__tar.gz → 0.0.13b0__tar.gz

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.
Files changed (52) hide show
  1. {risk_network-0.0.12b5/src/risk_network.egg-info → risk_network-0.0.13b0}/PKG-INFO +4 -3
  2. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/README.md +3 -2
  3. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/__init__.py +1 -1
  4. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/annotation/io.py +7 -7
  5. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/neighborhoods/neighborhoods.py +2 -2
  6. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/network/io.py +6 -6
  7. {risk_network-0.0.12b5 → risk_network-0.0.13b0/src/risk_network.egg-info}/PKG-INFO +4 -3
  8. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/LICENSE +0 -0
  9. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/pyproject.toml +0 -0
  10. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/setup.cfg +0 -0
  11. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/annotation/__init__.py +0 -0
  12. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/annotation/annotation.py +0 -0
  13. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/annotation/nltk_setup.py +0 -0
  14. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/log/__init__.py +0 -0
  15. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/log/console.py +0 -0
  16. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/log/parameters.py +0 -0
  17. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/neighborhoods/__init__.py +0 -0
  18. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/neighborhoods/api.py +0 -0
  19. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/neighborhoods/community.py +0 -0
  20. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/neighborhoods/domains.py +0 -0
  21. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/neighborhoods/stats/__init__.py +0 -0
  22. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/neighborhoods/stats/permutation/__init__.py +0 -0
  23. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/neighborhoods/stats/permutation/permutation.py +0 -0
  24. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/neighborhoods/stats/permutation/test_functions.py +0 -0
  25. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/neighborhoods/stats/tests.py +0 -0
  26. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/network/__init__.py +0 -0
  27. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/network/graph/__init__.py +0 -0
  28. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/network/graph/api.py +0 -0
  29. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/network/graph/graph.py +0 -0
  30. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/network/graph/stats.py +0 -0
  31. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/network/graph/summary.py +0 -0
  32. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/network/plotter/__init__.py +0 -0
  33. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/network/plotter/api.py +0 -0
  34. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/network/plotter/canvas.py +0 -0
  35. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/network/plotter/contour.py +0 -0
  36. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/network/plotter/labels.py +0 -0
  37. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/network/plotter/network.py +0 -0
  38. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/network/plotter/plotter.py +0 -0
  39. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/network/plotter/utils/colors.py +0 -0
  40. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/network/plotter/utils/layout.py +0 -0
  41. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk/risk.py +0 -0
  42. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk_network.egg-info/SOURCES.txt +0 -0
  43. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk_network.egg-info/dependency_links.txt +0 -0
  44. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk_network.egg-info/requires.txt +0 -0
  45. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/src/risk_network.egg-info/top_level.txt +0 -0
  46. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/tests/test_load_annotation.py +0 -0
  47. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/tests/test_load_graph.py +0 -0
  48. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/tests/test_load_io_combinations.py +0 -0
  49. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/tests/test_load_neighborhoods.py +0 -0
  50. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/tests/test_load_network.py +0 -0
  51. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/tests/test_load_plotter.py +0 -0
  52. {risk_network-0.0.12b5 → risk_network-0.0.13b0}/tests/test_log.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: risk-network
3
- Version: 0.0.12b5
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 cite:
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", **Bioinformatics**, 2025. DOI: [10.1234/zenodo.xxxxxxx](https://doi.org/10.1234/zenodo.xxxxxxx)
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
 
@@ -49,9 +49,10 @@ This figure highlights RISK’s capability to detect both established and novel
49
49
 
50
50
  ## Citation
51
51
 
52
- If you use RISK in your research, please cite:
52
+ If you use RISK in your research, please reference the following:
53
53
 
54
- **Horecka et al.**, "RISK: a next-generation tool for biological network annotation and visualization", **Bioinformatics**, 2025. DOI: [10.1234/zenodo.xxxxxxx](https://doi.org/10.1234/zenodo.xxxxxxx)
54
+ **Horecka et al.**, *"RISK: a next-generation tool for biological network annotation and visualization"*, 2025.
55
+ DOI: [10.1234/zenodo.xxxxxxx](https://doi.org/10.1234/zenodo.xxxxxxx)
55
56
 
56
57
  ## Software Architecture and Implementation
57
58
 
@@ -7,4 +7,4 @@ RISK: Regional Inference of Significant Kinships
7
7
 
8
8
  from risk.risk import RISK
9
9
 
10
- __version__ = "0.0.12-beta.5"
10
+ __version__ = "0.0.13-beta.0"
@@ -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._log_loading(filetype, filepath=filepath)
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._log_loading(filetype, filepath=filepath)
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._log_loading(filetype, filepath=filepath)
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._log_loading(filetype, filepath=filepath)
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._log_loading(filetype, "In-memory dictionary")
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 _log_loading(self, filetype: str, filepath: str = "") -> None:
232
- """Log information about the network file being loaded.
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) -> np.floating[Any]:
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
- np.floating[Any]: The Euclidean distance between the two nodes.
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)
@@ -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._log_loading(filetype, filepath=filepath)
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._log_loading(filetype)
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._log_loading(filetype, filepath=filepath)
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._log_loading(filetype, filepath=filepath)
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 _log_loading(
675
+ def _log_loading_network(
676
676
  self,
677
677
  filetype: str,
678
678
  filepath: str = "",
679
679
  ) -> None:
680
- """Log the initialization details of the RISK class.
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.12b5
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 cite:
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", **Bioinformatics**, 2025. DOI: [10.1234/zenodo.xxxxxxx](https://doi.org/10.1234/zenodo.xxxxxxx)
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
 
File without changes