risk-network 0.0.6b7__py3-none-any.whl → 0.0.6b8__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.6-beta.7"
10
+ __version__ = "0.0.6-beta.8"
risk/network/plot.py CHANGED
@@ -569,6 +569,8 @@ class NetworkPlotter:
569
569
  arrow_style: str = "->",
570
570
  arrow_color: Union[str, List, Tuple, np.ndarray] = "black",
571
571
  arrow_alpha: float = 1.0,
572
+ arrow_base_shrink: float = 0.0,
573
+ arrow_tip_shrink: float = 0.0,
572
574
  max_labels: Union[int, None] = None,
573
575
  max_words: int = 10,
574
576
  min_words: int = 1,
@@ -592,6 +594,8 @@ class NetworkPlotter:
592
594
  arrow_style (str, optional): Style of the arrows pointing to centroids. Defaults to "->".
593
595
  arrow_color (str, list, tuple, or np.ndarray, optional): Color of the arrows. Defaults to "black".
594
596
  arrow_alpha (float, optional): Transparency level for the arrow color. Defaults to 1.0.
597
+ arrow_base_shrink (float, optional): Distance between the text and the base of the arrow. Defaults to 0.0.
598
+ arrow_tip_shrink (float, optional): Distance between the arrow tip and the centroid. Defaults to 0.0.
595
599
  max_labels (int, optional): Maximum number of labels to plot. Defaults to None (no limit).
596
600
  max_words (int, optional): Maximum number of words in a label. Defaults to 10.
597
601
  min_words (int, optional): Minimum number of words required to display a label. Defaults to 1.
@@ -622,6 +626,8 @@ class NetworkPlotter:
622
626
  label_arrow_style=arrow_style,
623
627
  label_arrow_color="custom" if isinstance(arrow_color, np.ndarray) else arrow_color,
624
628
  label_arrow_alpha=arrow_alpha,
629
+ label_arrow_base_shrink=arrow_base_shrink,
630
+ label_arrow_tip_shrink=arrow_tip_shrink,
625
631
  label_max_labels=max_labels,
626
632
  label_max_words=max_words,
627
633
  label_min_words=min_words,
@@ -746,7 +752,11 @@ class NetworkPlotter:
746
752
  fontname=font,
747
753
  color=fontcolor[idx],
748
754
  arrowprops=dict(
749
- arrowstyle=arrow_style, color=arrow_color[idx], linewidth=arrow_linewidth
755
+ arrowstyle=arrow_style,
756
+ color=arrow_color[idx],
757
+ linewidth=arrow_linewidth,
758
+ shrinkA=arrow_base_shrink,
759
+ shrinkB=arrow_tip_shrink,
750
760
  ),
751
761
  )
752
762
  # Overlay domain ID at the centroid if requested
@@ -778,6 +788,8 @@ class NetworkPlotter:
778
788
  arrow_style: str = "->",
779
789
  arrow_color: Union[str, List, Tuple, np.ndarray] = "black",
780
790
  arrow_alpha: float = 1.0,
791
+ arrow_base_shrink: float = 0.0,
792
+ arrow_tip_shrink: float = 0.0,
781
793
  ) -> None:
782
794
  """Annotate the network graph with a label for the given nodes, with one arrow pointing to each centroid of sublists of nodes.
783
795
 
@@ -795,6 +807,8 @@ class NetworkPlotter:
795
807
  arrow_style (str, optional): Style of the arrows pointing to the centroid. Defaults to "->".
796
808
  arrow_color (str, list, tuple, or np.ndarray, optional): Color of the arrow. Defaults to "black".
797
809
  arrow_alpha (float, optional): Transparency level for the arrow color. Defaults to 1.0.
810
+ arrow_base_shrink (float, optional): Distance between the text and the base of the arrow. Defaults to 0.0.
811
+ arrow_tip_shrink (float, optional): Distance between the arrow tip and the centroid. Defaults to 0.0.
798
812
  """
799
813
  # Check if nodes is a list of lists or a flat list
800
814
  if any(isinstance(item, (list, tuple, np.ndarray)) for item in nodes):
@@ -844,7 +858,11 @@ class NetworkPlotter:
844
858
  fontname=font,
845
859
  color=fontcolor_rgba,
846
860
  arrowprops=dict(
847
- arrowstyle=arrow_style, color=arrow_color_rgba, linewidth=arrow_linewidth
861
+ arrowstyle=arrow_style,
862
+ color=arrow_color_rgba,
863
+ linewidth=arrow_linewidth,
864
+ shrinkA=arrow_base_shrink,
865
+ shrinkB=arrow_tip_shrink,
848
866
  ),
849
867
  )
850
868
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: risk-network
3
- Version: 0.0.6b7
3
+ Version: 0.0.6b8
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=DLDQBVlM5oYOp-S9i1GDq-rRwaNv1dutx241xcHbK3w,112
1
+ risk/__init__.py,sha256=oPfiZjsrydptQnR_sNyr6_C1nGrBvXcy5Kv5O15RTEc,112
2
2
  risk/constants.py,sha256=XInRaH78Slnw_sWgAsBFbUHkyA0h0jL0DKGuQNbOvjM,550
3
3
  risk/risk.py,sha256=PONl5tzN5DSVUf4MgczfOvzGV-5JoAOLTQ6YWl10mZ8,20697
4
4
  risk/annotations/__init__.py,sha256=vUpVvMRE5if01Ic8QY6M2Ae3EFGJHdugEe9PdEkAW4Y,138
@@ -15,7 +15,7 @@ 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=scPFQIJjioup1FjQLyxNrAB17RmskY9MmvoFHrMlqNI,13135
17
17
  risk/network/io.py,sha256=gG50kOknO-D3HkW1HsbHMkTMvjUtn3l4W4Jwd-rXNr8,21202
18
- risk/network/plot.py,sha256=4zcFJWZgGrj7AG1crRuwGpzzjjHXjQ8Eh5VjlkOQblE,60747
18
+ risk/network/plot.py,sha256=963dBReKAfJsgwkqcTMWNIEXFZ2KezqXzR6tjFDnFfc,61747
19
19
  risk/stats/__init__.py,sha256=e-BE_Dr_jgiK6hKM-T-tlG4yvHnId8e5qjnM0pdwNVc,230
20
20
  risk/stats/fisher_exact.py,sha256=-bPwzu76-ob0HzrTV20mXUTot7v-MLuqFaAoab-QxPg,4966
21
21
  risk/stats/hypergeom.py,sha256=lrIFdhCWRjvM4apYw1MlOKqT_IY5OjtCwrjdtJdt6Tg,4954
@@ -23,8 +23,8 @@ risk/stats/stats.py,sha256=kvShov-94W6ffgDUTb522vB9hDJQSyTsYif_UIaFfSM,7059
23
23
  risk/stats/permutation/__init__.py,sha256=neJp7FENC-zg_CGOXqv-iIvz1r5XUKI9Ruxhmq7kDOI,105
24
24
  risk/stats/permutation/permutation.py,sha256=qLWdwxEY6nmkYPxpM8HLDcd2mbqYv9Qr7CKtJvhLqIM,9220
25
25
  risk/stats/permutation/test_functions.py,sha256=HuDIM-V1jkkfE1rlaIqrWWBSKZt3dQ1f-YEDjWpnLSE,2343
26
- risk_network-0.0.6b7.dist-info/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
27
- risk_network-0.0.6b7.dist-info/METADATA,sha256=yiCOKKWr1cByfyrssz1g0LLSYLfvUr7XziphQPe2IkA,43142
28
- risk_network-0.0.6b7.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
29
- risk_network-0.0.6b7.dist-info/top_level.txt,sha256=NX7C2PFKTvC1JhVKv14DFlFAIFnKc6Lpsu1ZfxvQwVw,5
30
- risk_network-0.0.6b7.dist-info/RECORD,,
26
+ risk_network-0.0.6b8.dist-info/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
27
+ risk_network-0.0.6b8.dist-info/METADATA,sha256=n_jY1uEyX-lqf-BnQsz06e_kddid87kku6OShmoCfwk,43142
28
+ risk_network-0.0.6b8.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
29
+ risk_network-0.0.6b8.dist-info/top_level.txt,sha256=NX7C2PFKTvC1JhVKv14DFlFAIFnKc6Lpsu1ZfxvQwVw,5
30
+ risk_network-0.0.6b8.dist-info/RECORD,,