risk-network 0.0.9b16__py3-none-any.whl → 0.0.9b17__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.9-beta.16"
10
+ __version__ = "0.0.9-beta.17"
@@ -242,7 +242,7 @@ class Contour:
242
242
  logger.error("Contour levels must be strictly increasing. Skipping contour plot.")
243
243
  return None
244
244
 
245
- # Set the contour color and linestyle
245
+ # Set the contour color, fill, and linestyle
246
246
  contour_colors = [color for _ in range(levels - 1)]
247
247
  # Plot the filled contours using fill_alpha for transparency
248
248
  if fill_alpha and fill_alpha > 0:
@@ -258,33 +258,19 @@ class Contour:
258
258
  alpha=fill_alpha,
259
259
  )
260
260
 
261
- # Plot the contour lines with the specified RGBA alpha for transparency
262
- c = ax.contour(
261
+ # Plot the base contour line with the specified RGBA alpha for transparency
262
+ base_contour_color = [color]
263
+ base_contour_level = [contour_levels[0]]
264
+ ax.contour(
263
265
  x,
264
266
  y,
265
267
  z,
266
- levels=contour_levels,
267
- colors=contour_colors,
268
+ levels=base_contour_level,
269
+ colors=base_contour_color,
268
270
  linestyles=linestyle,
269
271
  linewidths=linewidth,
270
272
  )
271
273
 
272
- # Set linewidth for the contour lines to 0 for levels other than the base level
273
- c.set_linewidth(0)
274
- try:
275
- # Try setting linewidth directly on the QuadContourSet
276
- c.set_linewidth(0)
277
- except AttributeError:
278
- # Fallback: Iterate over collections if the direct method fails
279
- if hasattr(c, "collections"):
280
- for i, collection in enumerate(c.collections):
281
- collection.set_linewidth(0)
282
- else:
283
- # Raise an error if 'collections' is also not available
284
- raise AttributeError(
285
- "'QuadContourSet' object has neither 'set_linewidth' nor 'collections'"
286
- )
287
-
288
274
  def get_annotated_contour_colors(
289
275
  self,
290
276
  cmap: str = "gist_rainbow",
@@ -192,7 +192,9 @@ def _permutation_process_subset(
192
192
  local_counts_depletion = np.zeros(observed_neighborhood_scores.shape)
193
193
  local_counts_enrichment = np.zeros(observed_neighborhood_scores.shape)
194
194
 
195
- # NOTE: Limit the number of threads used by NumPy's BLAS implementation to 1 when more than one worker is used.
195
+ # Limit the number of threads used by NumPy's BLAS implementation to 1 when more than one worker is used
196
+ # NOTE: This does not work for Mac M chips due to a bug in the threadpoolctl package
197
+ # This is currently a known issue and is being addressed by the maintainers [https://github.com/joblib/threadpoolctl/issues/135]
196
198
  limits = None if max_workers == 1 else 1
197
199
  with threadpool_limits(limits=limits, user_api="blas"):
198
200
  # Initialize a local counter for batched progress updates
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: risk-network
3
- Version: 0.0.9b16
3
+ Version: 0.0.9b17
4
4
  Summary: A Python package for biological network analysis
5
5
  Author: Ira Horecka
6
6
  Author-email: Ira Horecka <ira89@icloud.com>
@@ -1,4 +1,4 @@
1
- risk/__init__.py,sha256=Y97538nwTi67cMHhP4b1tYJYhXdZHwHd4V63ET61HzA,127
1
+ risk/__init__.py,sha256=95ug0762a0OMBkPuFt_fuQuF8BgPXRfF_Dl3UCP6jMw,127
2
2
  risk/constants.py,sha256=XInRaH78Slnw_sWgAsBFbUHkyA0h0jL0DKGuQNbOvjM,550
3
3
  risk/risk.py,sha256=nodTixy31O3VK7ld-g74Fb9YEiyvKs_Vbor2lE2ADJ8,23632
4
4
  risk/annotations/__init__.py,sha256=kXgadEXaCh0z8OyhOhTj7c3qXGmWgOhaSZ4gSzSb59U,147
@@ -19,7 +19,7 @@ risk/network/graph/network.py,sha256=JzYbrgJLiNWFyPIR6_qNSjMtmXmfzRv2FwWSdyg8HjY
19
19
  risk/network/graph/summary.py,sha256=7w5gNYNspv02SscDAfHxdx-D1CWKmelSonyBnB9hbrE,9737
20
20
  risk/network/plot/__init__.py,sha256=MfmaXJgAZJgXZ2wrhK8pXwzETlcMaLChhWXKAozniAo,98
21
21
  risk/network/plot/canvas.py,sha256=W8dFv4XYTzCWXBchgsc0esOQRn4usM4LkwNGPSDMobE,13357
22
- risk/network/plot/contour.py,sha256=1Didhg9Z5seqdEITxWo7Av-Jg_TAuIHv_rPTMQZpkqo,16123
22
+ risk/network/plot/contour.py,sha256=zM2oRbiGbKHi9fWL7QNcwnTRkxCuQYEwH2mm6TaN_hw,15499
23
23
  risk/network/plot/labels.py,sha256=aU_ClDGVPHyQ3H5E_ygx8hsMhrpJB0i9Cn65PlLmw7s,45679
24
24
  risk/network/plot/network.py,sha256=0j7pAZgt9PBfFCnOz4QwXnYWTlnLjTrtMm-50I_1G8o,14028
25
25
  risk/network/plot/plotter.py,sha256=eS1vHqvOA2O001Rq7WiDcgqcehJ3fg4OPfvkezH4erw,5771
@@ -30,10 +30,10 @@ risk/stats/hypergeom.py,sha256=oc39f02ViB1vQ-uaDrxG_tzAT6dxQBRjc88EK2EGn78,2282
30
30
  risk/stats/poisson.py,sha256=polLgwS08MTCNzupYdmMUoEUYrJOjAbcYtYwjlfeE5Y,1803
31
31
  risk/stats/stats.py,sha256=z8NrhiVj4BzJ250bVLfytpmfC7RzYu7mBuIZD_l0aCA,7222
32
32
  risk/stats/permutation/__init__.py,sha256=neJp7FENC-zg_CGOXqv-iIvz1r5XUKI9Ruxhmq7kDOI,105
33
- risk/stats/permutation/permutation.py,sha256=meBNSrbRa9P8WJ54n485l0H7VQJlMSfHqdN4aCKYCtQ,10105
33
+ risk/stats/permutation/permutation.py,sha256=jfo7J7bjXTHH-k6_WuZ_5eB31JVynlI6SYMC_7icYyM,10320
34
34
  risk/stats/permutation/test_functions.py,sha256=lftOude6hee0pyR80HlBD32522JkDoN5hrKQ9VEbuoY,2345
35
- risk_network-0.0.9b16.dist-info/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
36
- risk_network-0.0.9b16.dist-info/METADATA,sha256=pGpChS9mrqjv7i21ReWmVdOK0VyuLoB9HmhDrRupWSY,47627
37
- risk_network-0.0.9b16.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
38
- risk_network-0.0.9b16.dist-info/top_level.txt,sha256=NX7C2PFKTvC1JhVKv14DFlFAIFnKc6Lpsu1ZfxvQwVw,5
39
- risk_network-0.0.9b16.dist-info/RECORD,,
35
+ risk_network-0.0.9b17.dist-info/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
36
+ risk_network-0.0.9b17.dist-info/METADATA,sha256=7Jh5RwTtOR7nnQIoLnT6wCamrgaAJxAZs6Zzncs0H9g,47627
37
+ risk_network-0.0.9b17.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
38
+ risk_network-0.0.9b17.dist-info/top_level.txt,sha256=NX7C2PFKTvC1JhVKv14DFlFAIFnKc6Lpsu1ZfxvQwVw,5
39
+ risk_network-0.0.9b17.dist-info/RECORD,,