bonesistools 1.2.6__tar.gz → 1.2.7__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 (165) hide show
  1. {bonesistools-1.2.6 → bonesistools-1.2.7}/.gitignore +1 -0
  2. {bonesistools-1.2.6 → bonesistools-1.2.7}/PKG-INFO +9 -7
  3. {bonesistools-1.2.6 → bonesistools-1.2.7}/README.md +2 -2
  4. {bonesistools-1.2.6 → bonesistools-1.2.7}/pyproject.toml +4 -2
  5. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/plotting/__init__.py +22 -4
  6. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/plotting/_barplot.py +50 -51
  7. bonesistools-1.2.7/src/bonesistools/sctools/plotting/_colors.py +466 -0
  8. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/plotting/_density.py +217 -87
  9. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/plotting/_distribution.py +347 -214
  10. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/plotting/_figure.py +2 -2
  11. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/plotting/_graph.py +93 -60
  12. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/plotting/_scatterplot.py +170 -107
  13. bonesistools-1.2.7/src/bonesistools/sctools/plotting/_utils.py +242 -0
  14. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/preprocessing/__init__.py +2 -0
  15. bonesistools-1.2.7/src/bonesistools/sctools/preprocessing/_hvg.py +253 -0
  16. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/tools/_clustering.py +1 -1
  17. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/tools/_embedding.py +3 -3
  18. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/tools/_maths.py +35 -10
  19. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/tools/_neighbors.py +144 -42
  20. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/tools/_utils.py +101 -16
  21. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/sct/conftest.py +1 -1
  22. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/sct/plotting/test_barplot.py +69 -2
  23. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/sct/plotting/test_colors.py +60 -1
  24. bonesistools-1.2.7/tests/sct/plotting/test_density.py +327 -0
  25. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/sct/plotting/test_distribution.py +158 -19
  26. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/sct/plotting/test_graph.py +39 -11
  27. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/sct/plotting/test_scatterplot.py +167 -29
  28. bonesistools-1.2.7/tests/sct/preprocessing/test_hvg.py +240 -0
  29. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/sct/preprocessing/test_transform.py +0 -4
  30. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/sct/tools/test_knnsc.py +18 -14
  31. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/sct/tools/test_maths.py +8 -4
  32. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/sct/tools/test_neighbors.py +49 -6
  33. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/sct/tools/test_utils.py +17 -5
  34. bonesistools-1.2.6/src/bonesistools/sctools/plotting/_colors.py +0 -325
  35. bonesistools-1.2.6/src/bonesistools/sctools/plotting/_utils.py +0 -78
  36. bonesistools-1.2.6/tests/sct/plotting/test_density.py +0 -182
  37. {bonesistools-1.2.6 → bonesistools-1.2.7}/LICENSE +0 -0
  38. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/__init__.py +0 -0
  39. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/_compat.py +0 -0
  40. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/_metadata.py +0 -0
  41. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/_typing.py +0 -0
  42. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/_validation.py +0 -0
  43. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/_warnings.py +0 -0
  44. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/boolpy/__init__.py +0 -0
  45. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/boolpy/boolean_algebra/__init__.py +0 -0
  46. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/boolpy/boolean_algebra/_algebra.py +0 -0
  47. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/boolpy/boolean_algebra/_boolean.py +0 -0
  48. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/boolpy/boolean_algebra/_hypercube.py +0 -0
  49. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/boolpy/boolean_algebra/_parser.py +0 -0
  50. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/boolpy/boolean_algebra/_representation.py +0 -0
  51. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/boolpy/boolean_algebra/_structure.py +0 -0
  52. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/boolpy/boolean_algebra/_typing.py +0 -0
  53. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/boolpy/boolean_network/__init__.py +0 -0
  54. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/boolpy/boolean_network/_network.py +0 -0
  55. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/boolpy/boolean_network/_parser.py +0 -0
  56. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/boolpy/boolean_network/_typing.py +0 -0
  57. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/boolpy/influence_graph/__init__.py +0 -0
  58. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/boolpy/influence_graph/_algorithms.py +0 -0
  59. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/boolpy/influence_graph/_distances.py +0 -0
  60. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/boolpy/influence_graph/_influence_graph.py +0 -0
  61. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/boolpy/influence_graph/_parser.py +0 -0
  62. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/boolpy/influence_graph/_scoring.py +0 -0
  63. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/boolpy/influence_graph/_typing.py +0 -0
  64. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/boolpy/plotting/__init__.py +0 -0
  65. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/boolpy/plotting/_graphviz.py +0 -0
  66. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/boolpy/plotting/_styles.py +0 -0
  67. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/boolpy/plotting/_svg.py +0 -0
  68. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/__init__.py +0 -0
  69. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/hcop/__init__.py +0 -0
  70. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/hcop/_orthologs.py +0 -0
  71. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/hcop/data/human_anole_lizard_hcop.tsv.gz +0 -0
  72. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/hcop/data/human_c.elegans_hcop.tsv.gz +0 -0
  73. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/hcop/data/human_cat_hcop.tsv.gz +0 -0
  74. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/hcop/data/human_cattle_hcop.tsv.gz +0 -0
  75. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/hcop/data/human_chicken_hcop.tsv.gz +0 -0
  76. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/hcop/data/human_chimpanzee_hcop.tsv.gz +0 -0
  77. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/hcop/data/human_dog_hcop.tsv.gz +0 -0
  78. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/hcop/data/human_fruitfly_hcop.tsv.gz +0 -0
  79. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/hcop/data/human_horse_hcop.tsv.gz +0 -0
  80. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/hcop/data/human_macaque_hcop.tsv.gz +0 -0
  81. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/hcop/data/human_mouse_hcop.tsv.gz +0 -0
  82. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/hcop/data/human_opossum_hcop.tsv.gz +0 -0
  83. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/hcop/data/human_pig_hcop.tsv.gz +0 -0
  84. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/hcop/data/human_platypus_hcop.tsv.gz +0 -0
  85. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/hcop/data/human_rat_hcop.tsv.gz +0 -0
  86. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/hcop/data/human_s.cerevisiae_hcop.tsv.gz +0 -0
  87. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/hcop/data/human_s.pombe_hcop.tsv.gz +0 -0
  88. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/hcop/data/human_xenopus_hcop.tsv.gz +0 -0
  89. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/hcop/data/human_zebrafish_hcop.tsv.gz +0 -0
  90. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/ncbi/__init__.py +0 -0
  91. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/ncbi/_genesyn.py +0 -0
  92. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/ncbi/_typing.py +0 -0
  93. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/ncbi/data/gi/escherichia_coli_gene_info.tsv.gz +0 -0
  94. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/ncbi/data/gi/homo_sapiens_gene_info.tsv.gz +0 -0
  95. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/ncbi/data/gi/mus_musculus_gene_info.tsv.gz +0 -0
  96. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/omnipath/__init__.py +0 -0
  97. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/omnipath/_archive.py +0 -0
  98. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/omnipath/_collectri.py +0 -0
  99. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/databases/omnipath/_dorothea.py +0 -0
  100. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/grntools/__init__.py +0 -0
  101. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/py.typed +0 -0
  102. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/__init__.py +0 -0
  103. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/_dependencies.py +0 -0
  104. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/_metadata.py +0 -0
  105. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/_stats.py +0 -0
  106. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/_typing.py +0 -0
  107. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/_validation.py +0 -0
  108. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/datasets/__init__.py +0 -0
  109. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/datasets/_geo.py +0 -0
  110. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/datasets/nestorowa_hvg.h5ad +0 -0
  111. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/plotting/_typing.py +0 -0
  112. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/preprocessing/_duplicates.py +0 -0
  113. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/preprocessing/_filter.py +0 -0
  114. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/preprocessing/_genename.py +0 -0
  115. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/preprocessing/_simple.py +0 -0
  116. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/preprocessing/_transfer.py +0 -0
  117. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/preprocessing/_transform.py +0 -0
  118. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/tools/__init__.py +0 -0
  119. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/tools/_binarize.py +0 -0
  120. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/tools/_classification.py +0 -0
  121. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/tools/_conversion.py +0 -0
  122. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/tools/_graph.py +0 -0
  123. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/tools/_markers.py +0 -0
  124. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/tools/_regress.py +0 -0
  125. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/tools/_stats.py +0 -0
  126. {bonesistools-1.2.6 → bonesistools-1.2.7}/src/bonesistools/sctools/tools/_write.py +0 -0
  127. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/bpy/conftest.py +0 -0
  128. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/bpy/test_aggregated_influence_graph.py +0 -0
  129. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/bpy/test_boolean_algebra.py +0 -0
  130. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/bpy/test_boolean_network.py +0 -0
  131. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/bpy/test_boolean_network_ensemble.py +0 -0
  132. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/bpy/test_hypercube.py +0 -0
  133. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/bpy/test_hypercube_collection.py +0 -0
  134. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/bpy/test_influence_graph.py +0 -0
  135. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/bpy/test_influence_graph_distances.py +0 -0
  136. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/bpy/test_influence_graph_parser.py +0 -0
  137. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/bpy/test_influence_graph_scoring.py +0 -0
  138. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/bpy/test_partial_boolean.py +0 -0
  139. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/bpy/test_plotting_styles.py +0 -0
  140. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/dbs/test_hcop.py +0 -0
  141. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/dbs/test_hcop_orthologs.py +0 -0
  142. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/dbs/test_ncbi.py +0 -0
  143. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/dbs/test_omnipath.py +0 -0
  144. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/reproducibility/test_reproducibility_omnipath.py +0 -0
  145. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/reproducibility/test_reproducibility_stats.py +0 -0
  146. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/reproducibility/test_reproducibility_workflow.py +0 -0
  147. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/sct/datasets/test_geo.py +0 -0
  148. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/sct/plotting/test_figure.py +0 -0
  149. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/sct/preprocessing/test_duplicates.py +0 -0
  150. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/sct/preprocessing/test_genename.py +0 -0
  151. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/sct/preprocessing/test_simple.py +0 -0
  152. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/sct/preprocessing/test_transfer_obs.py +0 -0
  153. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/sct/test_typing.py +0 -0
  154. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/sct/tools/test_binarize.py +0 -0
  155. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/sct/tools/test_classification.py +0 -0
  156. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/sct/tools/test_clustering.py +0 -0
  157. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/sct/tools/test_conversion.py +0 -0
  158. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/sct/tools/test_embedding.py +0 -0
  159. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/sct/tools/test_markers.py +0 -0
  160. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/sct/tools/test_paga.py +0 -0
  161. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/sct/tools/test_regress.py +0 -0
  162. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/sct/tools/test_stats.py +0 -0
  163. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/sct/tools/test_write.py +0 -0
  164. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/test_import.py +0 -0
  165. {bonesistools-1.2.6 → bonesistools-1.2.7}/tests/test_validation.py +0 -0
@@ -108,6 +108,7 @@ q.log
108
108
  src/bonesistools/databases/omnipath/.cache/
109
109
  /data/
110
110
  /results/
111
+ benchmarks/results/
111
112
  !tests/
112
113
  !tests/data/
113
114
  !tests/data/*.h5ad
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bonesistools
3
- Version: 1.2.6
3
+ Version: 1.2.7
4
4
  Summary: Bioinformatics toolkit for upstream and downstream analyses around the BoNesis framework
5
5
  Project-URL: Repository, https://github.com/bnediction/bonesistools
6
6
  Author: Théo Roncalli
@@ -568,6 +568,7 @@ Requires-Dist: mpbn>=4.1; extra == 'all'
568
568
  Requires-Dist: mudata>=0.3.1; extra == 'all'
569
569
  Requires-Dist: multiprocess>=0.70.18; extra == 'all'
570
570
  Requires-Dist: pydot>=3.0.2; extra == 'all'
571
+ Requires-Dist: scikit-misc>=0.5; (python_version >= '3.10') and extra == 'all'
571
572
  Requires-Dist: seaborn>=0.11; extra == 'all'
572
573
  Requires-Dist: umap-learn>=0.5; extra == 'all'
573
574
  Provides-Extra: graphviz
@@ -576,10 +577,11 @@ Provides-Extra: mpbn
576
577
  Requires-Dist: mpbn>=4.1; extra == 'mpbn'
577
578
  Provides-Extra: mudata
578
579
  Requires-Dist: mudata>=0.3.1; extra == 'mudata'
579
- Provides-Extra: sctools
580
- Requires-Dist: igraph>=0.10; extra == 'sctools'
581
- Requires-Dist: leidenalg>=0.10; extra == 'sctools'
582
- Requires-Dist: umap-learn>=0.5; extra == 'sctools'
580
+ Provides-Extra: omics
581
+ Requires-Dist: igraph>=0.10; extra == 'omics'
582
+ Requires-Dist: leidenalg>=0.10; extra == 'omics'
583
+ Requires-Dist: scikit-misc>=0.5; (python_version >= '3.10') and extra == 'omics'
584
+ Requires-Dist: umap-learn>=0.5; extra == 'omics'
583
585
  Description-Content-Type: text/markdown
584
586
 
585
587
  [![tests](https://github.com/bnediction/bonesistools/actions/workflows/tests.yml/badge.svg)](https://github.com/bnediction/bonesistools/actions/workflows/tests.yml)
@@ -718,10 +720,10 @@ Install the latest release:
718
720
  pip install bonesistools
719
721
  ```
720
722
 
721
- Install the single-cell dependencies:
723
+ Install the omics dependencies:
722
724
 
723
725
  ```sh
724
- pip install "bonesistools[sctools]"
726
+ pip install "bonesistools[omics]"
725
727
  ```
726
728
 
727
729
  Install all optional dependencies:
@@ -134,10 +134,10 @@ Install the latest release:
134
134
  pip install bonesistools
135
135
  ```
136
136
 
137
- Install the single-cell dependencies:
137
+ Install the omics dependencies:
138
138
 
139
139
  ```sh
140
- pip install "bonesistools[sctools]"
140
+ pip install "bonesistools[omics]"
141
141
  ```
142
142
 
143
143
  Install all optional dependencies:
@@ -5,7 +5,7 @@ build-backend = "hatchling.build"
5
5
  [project]
6
6
  name = "bonesistools"
7
7
  description = "Bioinformatics toolkit for upstream and downstream analyses around the BoNesis framework"
8
- version = "1.2.6"
8
+ version = "1.2.7"
9
9
  license = {file = "LICENSE"}
10
10
  credits = ["BNeDiction", "PEPR Santé Numérique 2030"]
11
11
  authors = [
@@ -76,15 +76,17 @@ all = [
76
76
  "igraph>=0.10",
77
77
  "leidenalg>=0.10",
78
78
  "seaborn>=0.11",
79
+ "scikit-misc>=0.5; python_version >= '3.10'",
79
80
  "umap-learn>=0.5",
80
81
  "mpbn>=4.1",
81
82
  ]
82
83
  graphviz = [ "graphviz>=0.20" ]
83
84
  mudata = [ "mudata>=0.3.1" ]
84
85
  mpbn = [ "mpbn>=4.1" ]
85
- sctools = [
86
+ omics = [
86
87
  "igraph>=0.10",
87
88
  "leidenalg>=0.10",
89
+ "scikit-misc>=0.5; python_version >= '3.10'",
88
90
  "umap-learn>=0.5",
89
91
  ]
90
92
 
@@ -12,13 +12,22 @@ from typing import List as _List
12
12
 
13
13
  from ._barplot import composition
14
14
  from ._colors import (
15
- COLORS,
15
+ CLASSIC_COLORS,
16
+ EARTH_COLORS,
17
+ HEX_COLORS,
16
18
  LIGHT_COLORS,
19
+ PALETTES,
17
20
  QUALITATIVE_COLORS,
18
- bonesis_cm,
21
+ RGB_COLORS,
22
+ Palette,
23
+ classic_cm,
19
24
  color_cycle,
25
+ earth_cm,
20
26
  generate_colormap,
21
27
  get_color,
28
+ get_colormap,
29
+ get_palette,
30
+ light_cm,
22
31
  rgb,
23
32
  rgb2hex,
24
33
  )
@@ -46,12 +55,21 @@ __all__ = [
46
55
  "rgb",
47
56
  "rgb2hex",
48
57
  "get_color",
58
+ "get_palette",
59
+ "get_colormap",
49
60
  "generate_colormap",
50
- "COLORS",
61
+ "CLASSIC_COLORS",
51
62
  "LIGHT_COLORS",
63
+ "EARTH_COLORS",
52
64
  "QUALITATIVE_COLORS",
65
+ "HEX_COLORS",
66
+ "RGB_COLORS",
67
+ "PALETTES",
68
+ "Palette",
53
69
  "color_cycle",
54
- "bonesis_cm",
70
+ "classic_cm",
71
+ "light_cm",
72
+ "earth_cm",
55
73
  "set_default_params",
56
74
  "set_default_axis",
57
75
  ]
@@ -6,7 +6,6 @@ from collections.abc import Mapping as MappingABC
6
6
  from pathlib import Path
7
7
  from typing import (
8
8
  Any,
9
- Callable,
10
9
  Dict,
11
10
  Iterator,
12
11
  Mapping,
@@ -30,6 +29,7 @@ from ..._compat import Literal
30
29
  from .._typing import ScData, anndata_or_mudata_checker
31
30
  from ._colors import QUALITATIVE_COLORS, generate_colormap
32
31
  from ._utils import (
32
+ _resolve_legend_options,
33
33
  colormap_colors,
34
34
  colors_from_uns,
35
35
  figure_from_axes,
@@ -140,20 +140,21 @@ def composition(
140
140
  scdata: ScData,
141
141
  obs: str,
142
142
  groupby: str,
143
+ *,
143
144
  obs_order: Optional[Sequence[object]] = None,
144
145
  group_order: Optional[Sequence[object]] = None,
145
- colors: Optional[Colors] = None,
146
- group_colors: Optional[Mapping[object, object]] = None,
147
146
  normalize: bool = True,
148
147
  percent: bool = True,
149
148
  dropna: bool = True,
149
+ title: Optional[Union[str, Dict[str, Any]]] = None,
150
+ legend: Optional[Dict[str, Any]] = None,
151
+ show_legend: bool = True,
150
152
  orientation: Orientation = "vertical",
151
153
  width: float = 0.8,
152
- title: Optional[Union[str, Dict[str, Any]]] = None,
153
- showlegend: bool = True,
154
- default_parameters: Optional[Callable[[], None]] = None,
155
- outfile: None = None,
154
+ colors: Optional[Colors] = None,
155
+ group_colors: Optional[Mapping[object, object]] = None,
156
156
  ax: Optional[Axes] = None,
157
+ outfile: None = None,
157
158
  **kwargs: Any,
158
159
  ) -> Tuple[Figure, Axes]: ...
159
160
 
@@ -163,21 +164,21 @@ def composition(
163
164
  scdata: ScData,
164
165
  obs: str,
165
166
  groupby: str,
167
+ *,
166
168
  obs_order: Optional[Sequence[object]] = None,
167
169
  group_order: Optional[Sequence[object]] = None,
168
- colors: Optional[Colors] = None,
169
- group_colors: Optional[Mapping[object, object]] = None,
170
170
  normalize: bool = True,
171
171
  percent: bool = True,
172
172
  dropna: bool = True,
173
+ title: Optional[Union[str, Dict[str, Any]]] = None,
174
+ legend: Optional[Dict[str, Any]] = None,
175
+ show_legend: bool = True,
173
176
  orientation: Orientation = "vertical",
174
177
  width: float = 0.8,
175
- title: Optional[Union[str, Dict[str, Any]]] = None,
176
- showlegend: bool = True,
177
- default_parameters: Optional[Callable[[], None]] = None,
178
- *,
179
- outfile: Path,
178
+ colors: Optional[Colors] = None,
179
+ group_colors: Optional[Mapping[object, object]] = None,
180
180
  ax: Optional[Axes] = None,
181
+ outfile: Path,
181
182
  **kwargs: Any,
182
183
  ) -> None: ...
183
184
 
@@ -187,21 +188,21 @@ def composition(
187
188
  scdata: ScData,
188
189
  obs: str,
189
190
  groupby: str,
191
+ *,
190
192
  obs_order: Optional[Sequence[object]] = None,
191
193
  group_order: Optional[Sequence[object]] = None,
192
- colors: Optional[Colors] = None,
193
- group_colors: Optional[Mapping[object, object]] = None,
194
194
  normalize: bool = True,
195
195
  percent: bool = True,
196
196
  dropna: bool = True,
197
+ title: Optional[Union[str, Dict[str, Any]]] = None,
198
+ legend: Optional[Dict[str, Any]] = None,
199
+ show_legend: bool = True,
197
200
  orientation: Orientation = "vertical",
198
201
  width: float = 0.8,
199
- title: Optional[Union[str, Dict[str, Any]]] = None,
200
- showlegend: bool = True,
201
- default_parameters: Optional[Callable[[], None]] = None,
202
- *,
203
- outfile: Optional[Path] = None,
202
+ colors: Optional[Colors] = None,
203
+ group_colors: Optional[Mapping[object, object]] = None,
204
204
  ax: Optional[Axes] = None,
205
+ outfile: Optional[Path] = None,
205
206
  **kwargs: Any,
206
207
  ) -> Optional[Tuple[Figure, Axes]]: ...
207
208
 
@@ -211,20 +212,21 @@ def composition(
211
212
  scdata: ScData, # type: ignore
212
213
  obs: str,
213
214
  groupby: str,
215
+ *,
214
216
  obs_order: Optional[Sequence[object]] = None,
215
217
  group_order: Optional[Sequence[object]] = None,
216
- colors: Optional[Colors] = None,
217
- group_colors: Optional[Mapping[object, object]] = None,
218
218
  normalize: bool = True,
219
219
  percent: bool = True,
220
220
  dropna: bool = True,
221
+ title: Optional[Union[str, Dict[str, Any]]] = None,
222
+ legend: Optional[Dict[str, Any]] = None,
223
+ show_legend: bool = True,
221
224
  orientation: Orientation = "vertical",
222
225
  width: float = 0.8,
223
- title: Optional[Union[str, Dict[str, Any]]] = None,
224
- showlegend: bool = True,
225
- default_parameters: Optional[Callable[[], None]] = None,
226
- outfile: Optional[Path] = None,
226
+ colors: Optional[Colors] = None,
227
+ group_colors: Optional[Mapping[object, object]] = None,
227
228
  ax: Optional[Axes] = None,
229
+ outfile: Optional[Path] = None,
228
230
  **kwargs: Any,
229
231
  ) -> Optional[Tuple[Figure, Axes]]:
230
232
  """
@@ -242,33 +244,33 @@ def composition(
242
244
  Segment order. If None, categorical order or observed order is used.
243
245
  group_order: sequence, optional
244
246
  Bar order. If None, categorical order or observed order is used.
245
- colors: colormap name, sequence, colormap or mapping, optional
246
- Segment colors. If None, `scdata.uns["<obs>_color"]`,
247
- `scdata.uns["<obs>_colors"]` or a qualitative palette is used.
248
- group_colors: mapping, optional
249
- Colors applied to group tick labels. If None,
250
- `scdata.uns["<groupby>_color"]` or `scdata.uns["<groupby>_colors"]` is
251
- used when available.
252
247
  normalize: bool (default: True)
253
248
  Plot proportions within each group instead of raw counts.
254
249
  percent: bool (default: True)
255
250
  Format the y-axis as percentages when `normalize=True`.
256
251
  dropna: bool (default: True)
257
252
  Drop observations with missing `obs` or `groupby` values.
253
+ title: str or dict, optional
254
+ Figure title, or keyword arguments passed to `Axes.set_title`.
255
+ legend: dict, optional
256
+ Keyword arguments passed to `Axes.legend` when `show_legend=True`.
257
+ show_legend: bool (default: True)
258
+ Draw the segment legend.
258
259
  orientation: {"vertical", "horizontal"} (default: "vertical")
259
260
  Draw vertical stacked bars or horizontal stacked bars.
260
261
  width: float (default: 0.8)
261
262
  Bar width.
262
- title: str or dict, optional
263
- Figure title, or keyword arguments passed to `Axes.set_title`.
264
- showlegend: bool (default: True)
265
- Draw the segment legend.
266
- default_parameters: Callable, optional
267
- Function specifying default figure parameters.
268
- outfile: Path, optional
269
- If specified, save the figure instead of returning it.
263
+ colors: colormap name, sequence, colormap or mapping, optional
264
+ Segment colors. If None, `scdata.uns["<obs>_color"]`,
265
+ `scdata.uns["<obs>_colors"]` or a qualitative palette is used.
266
+ group_colors: mapping, optional
267
+ Colors applied to group tick labels. If None,
268
+ `scdata.uns["<groupby>_color"]` or `scdata.uns["<groupby>_colors"]` is
269
+ used when available.
270
270
  ax: Axes, optional
271
271
  Existing axes used for drawing.
272
+ outfile: Path, optional
273
+ If specified, save the figure instead of returning it.
272
274
  **kwargs: Any
273
275
  Supplemental features for figure plotting:
274
276
  - figheight[float]: specify the figure height
@@ -283,8 +285,6 @@ def composition(
283
285
  - tick_params[dict]: change the appearance of ticks, tick labels, and
284
286
  gridlines following the syntax of matplotlib.axes.Axes.tick_params
285
287
  - bar[dict]: keyword arguments passed to `DataFrame.plot`
286
- - legend[dict]: when showlegend is True, modify legend following the
287
- syntax of matplotlib.pyplot.legend
288
288
 
289
289
  Returns
290
290
  -------
@@ -306,8 +306,7 @@ def composition(
306
306
  f"expected 'vertical' or 'horizontal' but received {orientation!r}"
307
307
  )
308
308
 
309
- if default_parameters:
310
- default_parameters()
309
+ show_legend, legend = _resolve_legend_options(show_legend, legend, kwargs)
311
310
 
312
311
  data = scdata.obs[[groupby, obs]]
313
312
  data = data.dropna() if dropna else data
@@ -406,18 +405,18 @@ def composition(
406
405
  f"expected {str} or {dict} but received {type(title)}"
407
406
  )
408
407
 
409
- legend = ax.get_legend()
408
+ existing_legend = ax.get_legend()
410
409
 
411
- if showlegend:
410
+ if show_legend:
412
411
  legend_kwargs = {
413
412
  "bbox_to_anchor": (1.0, 0.6),
414
413
  "loc": "center left",
415
414
  "frameon": False,
416
415
  }
417
- legend_kwargs.update(kwargs["legend"] if "legend" in kwargs else {})
416
+ legend_kwargs.update({} if legend is None else legend)
418
417
  ax.legend(**legend_kwargs)
419
- elif legend is not None:
420
- legend.remove()
418
+ elif existing_legend is not None:
419
+ existing_legend.remove()
421
420
 
422
421
  if outfile:
423
422
  plt.savefig(outfile, bbox_inches="tight")