risk-network 0.0.12b1__py3-none-any.whl → 0.0.12b2__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: Regional Inference of Significant Kinships
7
7
 
8
8
  from risk.risk import RISK
9
9
 
10
- __version__ = "0.0.12-beta.1"
10
+ __version__ = "0.0.12-beta.2"
@@ -71,14 +71,18 @@ class Graph:
71
71
  # NOTE: Only after the above attributes are initialized, we can create the summary
72
72
  self.summary = Summary(annotations, neighborhoods, self)
73
73
 
74
- def pop(self, domain_id: str) -> None:
75
- """Remove domain ID from instance domain ID mappings. This can be useful for cleaning up
76
- domain-specific mappings based on a given criterion, as domain attributes are stored and
77
- accessed only in dictionaries modified by this method.
74
+ def pop(self, domain_id: int) -> List[str]:
75
+ """Remove a domain ID from the graph and return the corresponding node labels.
78
76
 
79
77
  Args:
80
- key (str): The domain ID key to be removed from each mapping.
78
+ key (int): The domain ID key to be removed from each mapping.
79
+
80
+ Returns:
81
+ List[str]: A list of node labels associated with the domain ID.
81
82
  """
83
+ # Get the node labels associated with the domain ID
84
+ node_labels = self.domain_id_to_node_labels_map.get(domain_id, [])
85
+
82
86
  # Define the domain mappings to be updated
83
87
  domain_mappings = [
84
88
  self.domain_id_to_node_ids_map,
@@ -97,6 +101,8 @@ class Graph:
97
101
  domain_info["domains"].remove(domain_id)
98
102
  domain_info["significances"].pop(domain_id)
99
103
 
104
+ return node_labels
105
+
100
106
  def _create_domain_id_to_node_ids_map(self, domains: pd.DataFrame) -> Dict[int, Any]:
101
107
  """Create a mapping from domains to the list of node IDs belonging to each domain.
102
108
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: risk-network
3
- Version: 0.0.12b1
3
+ Version: 0.0.12b2
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
@@ -1,4 +1,4 @@
1
- risk/__init__.py,sha256=ADVxFWQawaQ0uFwnpUUmlwzs9FIxFA9tFem9_pB5rn4,127
1
+ risk/__init__.py,sha256=nLYCewXh0bv7m9yMONHuLKUYeROqeAHT1qeYuTnrp0s,127
2
2
  risk/risk.py,sha256=_Zs8cC4V0eqzfaMbq9M50ir815dbYS-oyTPlrySuMLw,1121
3
3
  risk/annotations/__init__.py,sha256=cW2qf4se_Ehmo69mZE3aKy_LzWlTnffcI8KOKqqCock,192
4
4
  risk/annotations/annotations.py,sha256=KtFyCiCnoAkhin3HKDBtkNcz5imjpysrmEfQKUwyqh8,14737
@@ -21,7 +21,7 @@ risk/network/__init__.py,sha256=C9GisdyJM7fizwUIipy1vC4lbry9ceqLn1iBcW0-mZg,34
21
21
  risk/network/io.py,sha256=KXtQPFXYMBe8QNZQtp75AJHzaQhzJX9au4ZrVCZhaJg,27886
22
22
  risk/network/graph/__init__.py,sha256=iG6IlE8xtAyF6_NuCBUpsJrjrjd1vsXO1Ajsr0K8EA0,46
23
23
  risk/network/graph/api.py,sha256=ThlQ3MCCa4EkDWfflY_RcBsK_ekxe-dyhkSLEY9-udo,8550
24
- risk/network/graph/graph.py,sha256=69frjpl2z7JjIyVqBhlOUzv4keDXOBDzwKcrCNS1KGM,12334
24
+ risk/network/graph/graph.py,sha256=p9nRiqk6kgp07X3sNhrvqwNb8Knr06k-PztN0YiZLE0,12427
25
25
  risk/network/graph/stats.py,sha256=xITodchaF8Pgngynil_GM9IeMBtxuraPX-Gjp6WBEMY,7338
26
26
  risk/network/graph/summary.py,sha256=_3zuPFSDegti23uRpa24pbE6sUYCt7ucYQXtFNKMbX4,10277
27
27
  risk/network/plotter/__init__.py,sha256=9kdeONe8NaJvJ5FO7eOdZiobqL4CeR7q2MghG4z6Kt8,50
@@ -33,8 +33,8 @@ risk/network/plotter/network.py,sha256=0VySlJ4n3tkHsOhVVSa3yiSppT8y1dmIwa-DhRn0t
33
33
  risk/network/plotter/plotter.py,sha256=KJ_7Ye98ha6mchEaNY8kT0qCHAiGWZUzPiI3RCI9Wx0,5975
34
34
  risk/network/plotter/utils/colors.py,sha256=Pqa5pYZi8qdP9AsdXVY6u4a8sEKM3cF8gBP9TQwDTfI,19015
35
35
  risk/network/plotter/utils/layout.py,sha256=OPqV8jzV9dpnOhYU4SYMSfsIXalVzESrlBSI_Y43OGU,3640
36
- risk_network-0.0.12b1.dist-info/licenses/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
37
- risk_network-0.0.12b1.dist-info/METADATA,sha256=Lyrx0dcjEsfc-hC8GS82asYFs-BSySsTI1UFhKdoX4A,6667
38
- risk_network-0.0.12b1.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
39
- risk_network-0.0.12b1.dist-info/top_level.txt,sha256=NX7C2PFKTvC1JhVKv14DFlFAIFnKc6Lpsu1ZfxvQwVw,5
40
- risk_network-0.0.12b1.dist-info/RECORD,,
36
+ risk_network-0.0.12b2.dist-info/licenses/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
37
+ risk_network-0.0.12b2.dist-info/METADATA,sha256=KMVEl3qIYJnczRiAu-7L7OU5eF69XdtWXuazPTsmS68,6667
38
+ risk_network-0.0.12b2.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
39
+ risk_network-0.0.12b2.dist-info/top_level.txt,sha256=NX7C2PFKTvC1JhVKv14DFlFAIFnKc6Lpsu1ZfxvQwVw,5
40
+ risk_network-0.0.12b2.dist-info/RECORD,,