risk-network 0.0.8b17__py3-none-any.whl → 0.0.8b18__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.17"
10
+ __version__ = "0.0.8-beta.18"
@@ -878,28 +878,35 @@ def _apply_str_transformation(
878
878
  Returns:
879
879
  List[str]: A list of transformed words with no duplicates.
880
880
  """
881
+ # Initialize a list to store transformed words
881
882
  transformed_words = []
882
883
  for word in words:
883
- # Convert the word to a string if it is not already
884
- word = str(word)
885
- transformed_word = word # Start with the original word
886
- # If transformation is a string, apply it to all words
887
- if isinstance(transformation, str):
888
- if hasattr(word, transformation):
889
- transformed_word = getattr(
890
- word, transformation
891
- )() # Apply the single transformation
892
-
893
- # If transformation is a dictionary, apply case-specific transformations
894
- elif isinstance(transformation, dict):
895
- for case_type, transform in transformation.items():
896
- if case_type == "lower" and word.islower() and transform:
897
- transformed_word = getattr(word, transform)()
898
- elif case_type == "upper" and word.isupper() and transform:
899
- transformed_word = getattr(word, transform)()
900
- elif case_type == "title" and word.istitle() and transform:
901
- transformed_word = getattr(word, transform)()
902
-
884
+ # Split word into subwords by space
885
+ subwords = word.split(" ")
886
+ transformed_subwords = []
887
+ # Apply transformation to each subword
888
+ for subword in subwords:
889
+ transformed_subword = subword # Start with the original subword
890
+ # If transformation is a string, apply it to all subwords
891
+ if isinstance(transformation, str):
892
+ if hasattr(subword, transformation):
893
+ transformed_subword = getattr(subword, transformation)()
894
+
895
+ # If transformation is a dictionary, apply case-specific transformations
896
+ elif isinstance(transformation, dict):
897
+ for case_type, transform in transformation.items():
898
+ if case_type == "lower" and subword.islower() and transform:
899
+ transformed_subword = getattr(subword, transform)()
900
+ elif case_type == "upper" and subword.isupper() and transform:
901
+ transformed_subword = getattr(subword, transform)()
902
+ elif case_type == "title" and subword.istitle() and transform:
903
+ transformed_subword = getattr(subword, transform)()
904
+
905
+ # Append the transformed subword to the list
906
+ transformed_subwords.append(transformed_subword)
907
+
908
+ # Rejoin the transformed subwords into a single string to preserve structure
909
+ transformed_word = " ".join(transformed_subwords)
903
910
  # Only append if the transformed word is not already in the list
904
911
  if transformed_word not in transformed_words:
905
912
  transformed_words.append(transformed_word)
@@ -1,6 +1,6 @@
1
1
  """
2
- risk/network/plot/utils/plot
3
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2
+ risk/network/plot/utils/color
3
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4
4
  """
5
5
 
6
6
  from typing import Any, Dict, List, Tuple, Union
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: risk-network
3
- Version: 0.0.8b17
3
+ Version: 0.0.8b18
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=pF-sA0CxulV6zIC6axfgeXWkkQGyVZGuoGF_u4RgoQM,113
1
+ risk/__init__.py,sha256=EoQiOdiY9moo1L8d1ybzWAGTSGsM9MzK9H_PfU8miI4,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
@@ -18,10 +18,10 @@ 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=JnjPQaryRb_J6LP36BT2-rlsbJO3T4tTBornL8Oqqbs,10778
20
20
  risk/network/plot/contour.py,sha256=8uwJ7K-Z6VMyr_uQ5VUyoQSqDHA7zDvR_nYAmLn60-I,14647
21
- risk/network/plot/labels.py,sha256=Gt2HIbYsC5QZNZa_Mk29hijDVv0_V0pXEl1IILaNKkY,44016
21
+ risk/network/plot/labels.py,sha256=ttEUiKkDq024v4MI-ZADW3sT7uRNQ6aL3kNB598Em90,44468
22
22
  risk/network/plot/network.py,sha256=9blVFeCp5x5XoGhPwOOdADegXC4gC72c2vrM2u4QPe0,13235
23
23
  risk/network/plot/plotter.py,sha256=lN-_GDXRk9V3IFu8q7QmPjJGBZiP0QYwSvU6dVVDV2E,5770
24
- risk/network/plot/utils/color.py,sha256=4W4EoQ_Fs4tmbngdczXnFkkAjvyYP5EV_P2Vu-TCCwY,15573
24
+ risk/network/plot/utils/color.py,sha256=_ZLIw_uv--nTXhUhZVaF0iCaYmfURTn_WnoFYdUcPrc,15575
25
25
  risk/network/plot/utils/layout.py,sha256=znssSqe2VZzzSz47hLZtTuXwMTpHR9b8lkQPL0BX7OA,1950
26
26
  risk/stats/__init__.py,sha256=WcgoETQ-hS0LQqKRsAMIPtP15xZ-4eul6VUBuUx4Wzc,220
27
27
  risk/stats/hypergeom.py,sha256=o6Qnj31gCAKxr2uQirXrbv7XvdDJGEq69MFW-ubx_hA,2272
@@ -30,8 +30,8 @@ risk/stats/stats.py,sha256=kvShov-94W6ffgDUTb522vB9hDJQSyTsYif_UIaFfSM,7059
30
30
  risk/stats/permutation/__init__.py,sha256=neJp7FENC-zg_CGOXqv-iIvz1r5XUKI9Ruxhmq7kDOI,105
31
31
  risk/stats/permutation/permutation.py,sha256=D84Rcpt6iTQniK0PfQGcw9bLcHbMt9p-ARcurUnIXZQ,10095
32
32
  risk/stats/permutation/test_functions.py,sha256=lftOude6hee0pyR80HlBD32522JkDoN5hrKQ9VEbuoY,2345
33
- risk_network-0.0.8b17.dist-info/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
34
- risk_network-0.0.8b17.dist-info/METADATA,sha256=HmkNnAzSs7IdEGzYirOsrzy0euWVd0Ezn4OztCtXhnE,47498
35
- risk_network-0.0.8b17.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
36
- risk_network-0.0.8b17.dist-info/top_level.txt,sha256=NX7C2PFKTvC1JhVKv14DFlFAIFnKc6Lpsu1ZfxvQwVw,5
37
- risk_network-0.0.8b17.dist-info/RECORD,,
33
+ risk_network-0.0.8b18.dist-info/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
34
+ risk_network-0.0.8b18.dist-info/METADATA,sha256=CYJnBG0E8gmlzPx15UYKAjbbsC3zs2Mmsq42NPzi1mY,47498
35
+ risk_network-0.0.8b18.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
36
+ risk_network-0.0.8b18.dist-info/top_level.txt,sha256=NX7C2PFKTvC1JhVKv14DFlFAIFnKc6Lpsu1ZfxvQwVw,5
37
+ risk_network-0.0.8b18.dist-info/RECORD,,