bonesistools 1.6.0__tar.gz → 1.7.0__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 (280) hide show
  1. {bonesistools-1.6.0 → bonesistools-1.7.0}/PKG-INFO +5 -6
  2. {bonesistools-1.6.0 → bonesistools-1.7.0}/README.md +3 -1
  3. {bonesistools-1.6.0 → bonesistools-1.7.0}/pyproject.toml +1 -5
  4. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/boolean_algebra/_hypercube.py +5 -2
  5. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/boolean_algebra/_structure.py +1 -1
  6. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/boolean_network/_network.py +34 -4
  7. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/influence_graph/__init__.py +10 -1
  8. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/influence_graph/_influence_graph.py +192 -9
  9. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/input_output/_geo.py +8 -3
  10. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/input_output/_nestorowa.py +5 -3
  11. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/plotting/_graph.py +1 -1
  12. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/plotting/_scatterplot.py +1 -1
  13. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/preprocessing/_transform.py +4 -1
  14. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/tools/_embedding.py +3 -2
  15. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/tools/_neighbors.py +6 -3
  16. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/README.md +16 -4
  17. bonesistools-1.7.0/tests/golden/_fingerprints.py +157 -0
  18. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/conftest.py +7 -0
  19. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/omics/_umap_diagnostics.py +3 -3
  20. bonesistools-1.7.0/tests/golden/omics/expected/umap.npz +0 -0
  21. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/omics/expected/umap_diagnostics/checkpoints.npz +0 -0
  22. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/omics/test_golden_omics_workflow.py +18 -11
  23. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/omics/test_golden_tsne_diagnostics.py +10 -2
  24. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/omics/test_golden_umap_diagnostics.py +38 -2
  25. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/bn/test_boolean_network.py +17 -0
  26. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/bn/test_boolean_network_ensemble.py +19 -0
  27. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/ig/test_aggregated_influence_graph.py +91 -0
  28. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/io/test_geo.py +9 -4
  29. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/io/test_nestorowa.py +3 -1
  30. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/pl/test_graph.py +14 -0
  31. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/test_typing.py +3 -1
  32. bonesistools-1.6.0/tests/golden/omics/expected/umap.npz +0 -0
  33. {bonesistools-1.6.0 → bonesistools-1.7.0}/.gitignore +0 -0
  34. {bonesistools-1.6.0 → bonesistools-1.7.0}/LICENSE +0 -0
  35. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/__init__.py +0 -0
  36. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/__init__.pyi +0 -0
  37. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/_compat.py +0 -0
  38. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/_metadata.py +0 -0
  39. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/_typing.py +0 -0
  40. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/_validation.py +0 -0
  41. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/_warnings.py +0 -0
  42. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/__init__.py +0 -0
  43. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/__init__.pyi +0 -0
  44. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/boolean_algebra/__init__.py +0 -0
  45. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/boolean_algebra/__init__.pyi +0 -0
  46. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/boolean_algebra/_algebra.py +0 -0
  47. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/boolean_algebra/_boolean.py +0 -0
  48. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/boolean_algebra/_configuration.py +0 -0
  49. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/boolean_algebra/_kleene.py +0 -0
  50. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/boolean_algebra/_parser.py +0 -0
  51. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/boolean_algebra/_representation.py +0 -0
  52. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/boolean_algebra/_robdd.py +0 -0
  53. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/boolean_algebra/_typing.py +0 -0
  54. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/boolean_network/__init__.py +0 -0
  55. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/boolean_network/_asynchronous.py +0 -0
  56. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/boolean_network/_bdd.py +0 -0
  57. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/boolean_network/_distances.py +0 -0
  58. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/boolean_network/_dynamics.py +0 -0
  59. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/boolean_network/_general.py +0 -0
  60. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/boolean_network/_most_permissive.py +0 -0
  61. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/boolean_network/_parser.py +0 -0
  62. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/boolean_network/_symbolic.py +0 -0
  63. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/boolean_network/_synchronous.py +0 -0
  64. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/boolean_network/_typing.py +0 -0
  65. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/influence_graph/_algorithms.py +0 -0
  66. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/influence_graph/_distances.py +0 -0
  67. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/influence_graph/_graphviz.py +0 -0
  68. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/influence_graph/_parser.py +0 -0
  69. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/influence_graph/_scoring.py +0 -0
  70. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/influence_graph/_styles.py +0 -0
  71. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/influence_graph/_svg.py +0 -0
  72. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/influence_graph/_typing.py +0 -0
  73. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/input_output/__init__.py +0 -0
  74. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/input_output/_boolean_network.py +0 -0
  75. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/input_output/_booleanization.py +0 -0
  76. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/input_output/_executable_model.py +0 -0
  77. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/input_output/_ginml.py +0 -0
  78. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/input_output/_hypercube.py +0 -0
  79. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/input_output/_influence_graph.py +0 -0
  80. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/input_output/_sbml.py +0 -0
  81. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/logic/input_output/_zginml.py +0 -0
  82. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/__init__.py +0 -0
  83. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/__init__.pyi +0 -0
  84. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/_dependencies.py +0 -0
  85. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/_metadata.py +0 -0
  86. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/_stats.py +0 -0
  87. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/_typing.py +0 -0
  88. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/_validation.py +0 -0
  89. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/datasets/__init__.py +0 -0
  90. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/datasets/__init__.pyi +0 -0
  91. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/input_output/__init__.py +0 -0
  92. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/input_output/__init__.pyi +0 -0
  93. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/input_output/_metadata.py +0 -0
  94. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/input_output/_pbmc3k.py +0 -0
  95. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/input_output/_registry.py +0 -0
  96. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/input_output/_write.py +0 -0
  97. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/input_output/datasets.json +0 -0
  98. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/plotting/__init__.py +0 -0
  99. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/plotting/__init__.pyi +0 -0
  100. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/plotting/_barplot.py +0 -0
  101. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/plotting/_colors.py +0 -0
  102. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/plotting/_density.py +0 -0
  103. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/plotting/_distribution.py +0 -0
  104. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/plotting/_figure.py +0 -0
  105. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/plotting/_typing.py +0 -0
  106. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/plotting/_utils.py +0 -0
  107. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/preprocessing/__init__.py +0 -0
  108. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/preprocessing/__init__.pyi +0 -0
  109. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/preprocessing/_classification.py +0 -0
  110. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/preprocessing/_duplicates.py +0 -0
  111. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/preprocessing/_filter.py +0 -0
  112. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/preprocessing/_genename.py +0 -0
  113. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/preprocessing/_hvg.py +0 -0
  114. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/preprocessing/_qc.py +0 -0
  115. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/preprocessing/_simple.py +0 -0
  116. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/preprocessing/_transfer.py +0 -0
  117. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/tools/__init__.py +0 -0
  118. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/tools/__init__.pyi +0 -0
  119. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/tools/_binarize.py +0 -0
  120. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/tools/_classification.py +0 -0
  121. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/tools/_clustering.py +0 -0
  122. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/tools/_conversion.py +0 -0
  123. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/tools/_graph.py +0 -0
  124. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/tools/_knnsc.py +0 -0
  125. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/tools/_markers.py +0 -0
  126. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/tools/_maths.py +0 -0
  127. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/tools/_regress.py +0 -0
  128. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/tools/_stats.py +0 -0
  129. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/tools/_utils.py +0 -0
  130. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/omics/tools/_write.py +0 -0
  131. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/py.typed +0 -0
  132. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/__init__.py +0 -0
  133. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/__init__.pyi +0 -0
  134. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/cache.py +0 -0
  135. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/cache.pyi +0 -0
  136. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/hcop/__init__.py +0 -0
  137. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/hcop/__init__.pyi +0 -0
  138. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/hcop/_orthologs.py +0 -0
  139. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/hcop/data/human_anole_lizard_hcop.tsv.gz +0 -0
  140. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/hcop/data/human_c.elegans_hcop.tsv.gz +0 -0
  141. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/hcop/data/human_cat_hcop.tsv.gz +0 -0
  142. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/hcop/data/human_cattle_hcop.tsv.gz +0 -0
  143. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/hcop/data/human_chicken_hcop.tsv.gz +0 -0
  144. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/hcop/data/human_chimpanzee_hcop.tsv.gz +0 -0
  145. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/hcop/data/human_dog_hcop.tsv.gz +0 -0
  146. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/hcop/data/human_fruitfly_hcop.tsv.gz +0 -0
  147. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/hcop/data/human_horse_hcop.tsv.gz +0 -0
  148. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/hcop/data/human_macaque_hcop.tsv.gz +0 -0
  149. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/hcop/data/human_mouse_hcop.tsv.gz +0 -0
  150. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/hcop/data/human_opossum_hcop.tsv.gz +0 -0
  151. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/hcop/data/human_pig_hcop.tsv.gz +0 -0
  152. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/hcop/data/human_platypus_hcop.tsv.gz +0 -0
  153. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/hcop/data/human_rat_hcop.tsv.gz +0 -0
  154. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/hcop/data/human_s.cerevisiae_hcop.tsv.gz +0 -0
  155. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/hcop/data/human_s.pombe_hcop.tsv.gz +0 -0
  156. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/hcop/data/human_xenopus_hcop.tsv.gz +0 -0
  157. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/hcop/data/human_zebrafish_hcop.tsv.gz +0 -0
  158. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/ncbi/__init__.py +0 -0
  159. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/ncbi/__init__.pyi +0 -0
  160. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/ncbi/_download.py +0 -0
  161. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/ncbi/_genesyn.py +0 -0
  162. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/ncbi/_identifiers.py +0 -0
  163. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/ncbi/_mapping_cache.py +0 -0
  164. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/ncbi/_typing.py +0 -0
  165. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/ncbi/data/gi/escherichia_coli_gene_info.tsv.gz +0 -0
  166. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/ncbi/data/gi/homo_sapiens_gene_info.tsv.gz +0 -0
  167. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/ncbi/data/gi/mus_musculus_gene_info.tsv.gz +0 -0
  168. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/omnipath/__init__.py +0 -0
  169. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/omnipath/__init__.pyi +0 -0
  170. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/omnipath/_archive.py +0 -0
  171. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/omnipath/_collectri.py +0 -0
  172. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/omnipath/_dorothea.py +0 -0
  173. {bonesistools-1.6.0 → bonesistools-1.7.0}/src/bonesistools/resources/omnipath/_graph_cache.py +0 -0
  174. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/__init__.py +0 -0
  175. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/LICENSE.txt +0 -0
  176. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/__init__.py +0 -0
  177. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/generate_expected.py +0 -0
  178. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/logic/__init__.py +0 -0
  179. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/logic/_boolean_workflow.py +0 -0
  180. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/logic/_graph_layout.py +0 -0
  181. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/logic/data/README.md +0 -0
  182. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/logic/data/sea_urchin_dorsal_ventral_axis.sbml +0 -0
  183. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/logic/expected/aggregated_influence_graph.dot +0 -0
  184. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/logic/expected/death_receptor_cell_fate_mp.npz +0 -0
  185. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/logic/expected/sea_urchin_dorsal_ventral_axis.bnet +0 -0
  186. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/logic/expected/synthetic_30_node_dynamics.npz +0 -0
  187. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/logic/test_golden_boolean_workflow.py +0 -0
  188. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/logic/test_golden_graph_layout.py +0 -0
  189. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/logic/test_golden_sea_urchin.py +0 -0
  190. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/omics/__init__.py +0 -0
  191. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/omics/_omics_workflow.py +0 -0
  192. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/omics/_tsne_diagnostics.py +0 -0
  193. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/omics/expected/hvg_binning.npz +0 -0
  194. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/omics/expected/hvg_loess.npz +0 -0
  195. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/omics/expected/knnsc.npz +0 -0
  196. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/omics/expected/neighbors.npz +0 -0
  197. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/omics/expected/pca.npz +0 -0
  198. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/omics/expected/qc.npz +0 -0
  199. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/omics/expected/spectral.npz +0 -0
  200. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/omics/expected/tsne.npz +0 -0
  201. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/omics/expected/tsne_diagnostics/checkpoints.npz +0 -0
  202. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/omics/pbmc3k.h5ad +0 -0
  203. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/golden/omics/test_pbmc3k.py +0 -0
  204. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/__init__.py +0 -0
  205. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/__init__.py +0 -0
  206. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/ba/__init__.py +0 -0
  207. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/ba/test_algebra.py +0 -0
  208. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/ba/test_boolean.py +0 -0
  209. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/ba/test_configuration.py +0 -0
  210. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/ba/test_hypercube.py +0 -0
  211. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/ba/test_kleene.py +0 -0
  212. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/ba/test_robdd.py +0 -0
  213. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/ba/test_structure.py +0 -0
  214. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/ba/test_typing.py +0 -0
  215. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/bn/__init__.py +0 -0
  216. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/bn/test_distances.py +0 -0
  217. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/bn/test_dynamics.py +0 -0
  218. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/bn/test_most_permissive.py +0 -0
  219. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/bn/test_symbolic.py +0 -0
  220. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/conftest.py +0 -0
  221. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/ig/__init__.py +0 -0
  222. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/ig/test_aggregated_visualization.py +0 -0
  223. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/ig/test_collapsing.py +0 -0
  224. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/ig/test_distances.py +0 -0
  225. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/ig/test_influence_graph.py +0 -0
  226. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/ig/test_parser.py +0 -0
  227. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/ig/test_scoring.py +0 -0
  228. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/ig/test_styles.py +0 -0
  229. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/io/__init__.py +0 -0
  230. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/io/test_ginml.py +0 -0
  231. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/logic/io/test_sbml.py +0 -0
  232. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/__init__.py +0 -0
  233. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/conftest.py +0 -0
  234. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/io/__init__.py +0 -0
  235. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/io/test_registry.py +0 -0
  236. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/io/test_write.py +0 -0
  237. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/pl/__init__.py +0 -0
  238. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/pl/test_barplot.py +0 -0
  239. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/pl/test_colors.py +0 -0
  240. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/pl/test_density.py +0 -0
  241. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/pl/test_distribution.py +0 -0
  242. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/pl/test_figure.py +0 -0
  243. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/pl/test_scatterplot.py +0 -0
  244. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/pl/test_utils.py +0 -0
  245. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/pp/__init__.py +0 -0
  246. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/pp/test_classification.py +0 -0
  247. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/pp/test_duplicates.py +0 -0
  248. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/pp/test_genename.py +0 -0
  249. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/pp/test_hvg.py +0 -0
  250. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/pp/test_qc.py +0 -0
  251. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/pp/test_simple.py +0 -0
  252. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/pp/test_transfer_obs.py +0 -0
  253. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/pp/test_transform.py +0 -0
  254. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/tl/__init__.py +0 -0
  255. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/tl/test_binarize.py +0 -0
  256. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/tl/test_clustering.py +0 -0
  257. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/tl/test_conversion.py +0 -0
  258. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/tl/test_embedding.py +0 -0
  259. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/tl/test_knnsc.py +0 -0
  260. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/tl/test_markers.py +0 -0
  261. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/tl/test_maths.py +0 -0
  262. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/tl/test_neighbors.py +0 -0
  263. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/tl/test_paga.py +0 -0
  264. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/tl/test_regress.py +0 -0
  265. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/tl/test_stats.py +0 -0
  266. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/tl/test_utils.py +0 -0
  267. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/omics/toy_data.py +0 -0
  268. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/resources/test_cache.py +0 -0
  269. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/resources/test_hcop.py +0 -0
  270. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/resources/test_ncbi.py +0 -0
  271. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/resources/test_omnipath.py +0 -0
  272. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/test_import.py +0 -0
  273. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/regression/test_validation.py +0 -0
  274. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/reproducibility/__init__.py +0 -0
  275. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/reproducibility/dorothea_legacy_mouse.sha256 +0 -0
  276. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/reproducibility/dorothea_modern_mouse_A_2025-08-13.sha256 +0 -0
  277. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/reproducibility/test_reproducibility_boolean_backends.py +0 -0
  278. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/reproducibility/test_reproducibility_omnipath.py +0 -0
  279. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/reproducibility/test_reproducibility_stats.py +0 -0
  280. {bonesistools-1.6.0 → bonesistools-1.7.0}/tests/reproducibility/test_reproducibility_workflow.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: bonesistools
3
- Version: 1.6.0
3
+ Version: 1.7.0
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
@@ -50,7 +50,6 @@ Provides-Extra: all
50
50
  Requires-Dist: graphviz>=0.20; extra == 'all'
51
51
  Requires-Dist: igraph>=0.10; extra == 'all'
52
52
  Requires-Dist: leidenalg>=0.10; extra == 'all'
53
- Requires-Dist: mpbn>=4.1; extra == 'all'
54
53
  Requires-Dist: mudata>=0.3.1; extra == 'all'
55
54
  Requires-Dist: multiprocess>=0.70.18; extra == 'all'
56
55
  Requires-Dist: numba>=0.60; (python_version >= '3.10') and extra == 'all'
@@ -58,8 +57,6 @@ Requires-Dist: pydot>=3.0.2; extra == 'all'
58
57
  Requires-Dist: scikit-misc>=0.5; (python_version >= '3.10') and extra == 'all'
59
58
  Requires-Dist: seaborn>=0.11; extra == 'all'
60
59
  Requires-Dist: umap-learn>=0.5; extra == 'all'
61
- Provides-Extra: bn
62
- Requires-Dist: mpbn>=4.1; extra == 'bn'
63
60
  Provides-Extra: graphviz
64
61
  Requires-Dist: graphviz>=0.20; extra == 'graphviz'
65
62
  Provides-Extra: mudata
@@ -79,7 +76,9 @@ Description-Content-Type: text/markdown
79
76
 
80
77
  # BoNesisTools
81
78
 
82
- `BoNesisTools` provides Python-implemented toolkits for upstream and downstream analyses around the [BoNesis](https://github.com/bnediction/bonesis) ecosystem.
79
+ Python toolkit for the executable Boolean modeling stack, from omics data to symbolic analyses.
80
+
81
+ `BoNesisTools` provides Python-implemented toolkits for the executable Boolean modeling stack, from omics data to symbolic analyses.
83
82
 
84
83
  The package provides:
85
84
 
@@ -5,7 +5,9 @@
5
5
 
6
6
  # BoNesisTools
7
7
 
8
- `BoNesisTools` provides Python-implemented toolkits for upstream and downstream analyses around the [BoNesis](https://github.com/bnediction/bonesis) ecosystem.
8
+ Python toolkit for the executable Boolean modeling stack, from omics data to symbolic analyses.
9
+
10
+ `BoNesisTools` provides Python-implemented toolkits for the executable Boolean modeling stack, from omics data to symbolic analyses.
9
11
 
10
12
  The package provides:
11
13
 
@@ -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.6.0"
8
+ version = "1.7.0"
9
9
  license = "CECILL-2.1"
10
10
  credits = ["BNeDiction", "PEPR Santé Numérique 2030"]
11
11
  authors = [
@@ -85,13 +85,9 @@ all = [
85
85
  "seaborn>=0.11",
86
86
  "scikit-misc>=0.5; python_version >= '3.10'",
87
87
  "umap-learn>=0.5",
88
- "mpbn>=4.1",
89
88
  ]
90
89
  graphviz = [ "graphviz>=0.20" ]
91
90
  mudata = [ "mudata>=0.3.1" ]
92
- bn = [
93
- "mpbn>=4.1",
94
- ]
95
91
  omics = [
96
92
  "igraph>=0.10",
97
93
  "leidenalg>=0.10",
@@ -174,10 +174,13 @@ class Hypercube(MutableMapping[str, PartialBoolean]):
174
174
  return len(self._values)
175
175
 
176
176
  @overload
177
- def update(self, mapping: Mapping[str, PartialBooleanLike]) -> None: ...
177
+ def update(self, __mapping: Mapping[str, PartialBooleanLike]) -> None: ...
178
178
 
179
179
  @overload
180
- def update(self, mapping: Iterable[Tuple[str, PartialBooleanLike]]) -> None: ...
180
+ def update(
181
+ self,
182
+ __mapping: Iterable[Tuple[str, PartialBooleanLike]],
183
+ ) -> None: ...
181
184
 
182
185
  @overload
183
186
  def update(self, **kwargs: PartialBooleanLike) -> None: ...
@@ -292,7 +292,7 @@ def _eval_as_bool(
292
292
  symbol: ba.TRUE if value else ba.FALSE for symbol, value in assignment.items()
293
293
  }
294
294
 
295
- value = expr.subs(substitutions).simplify()
295
+ value = cast(Expression, expr.subs(substitutions)).simplify()
296
296
  evaluated = _constant_expression_as_bool(ba, value)
297
297
 
298
298
  if evaluated is not None:
@@ -95,6 +95,7 @@ if TYPE_CHECKING:
95
95
 
96
96
  NodeStyle = Literal["count", "stability"]
97
97
  _PyBoolNetPrimes = Dict[str, List[List[Dict[str, int]]]]
98
+ _BOOLEAN_SYMBOL_CHARACTERS = (".", ":", "_", "-")
98
99
 
99
100
 
100
101
  class BooleanNetwork(Dict[str, Expression]):
@@ -187,7 +188,11 @@ class BooleanNetwork(Dict[str, Expression]):
187
188
  If `check=True` and a rule references an undefined component.
188
189
  """
189
190
 
190
- self.ba = BooleanAlgebra() if ba is None else ba
191
+ self.ba = (
192
+ BooleanAlgebra(allowed_in_token=_BOOLEAN_SYMBOL_CHARACTERS)
193
+ if ba is None
194
+ else ba
195
+ )
191
196
  super().__init__()
192
197
 
193
198
  if rules is not None:
@@ -994,7 +999,7 @@ class BooleanNetwork(Dict[str, Expression]):
994
999
  self.ba.Symbol(name): self.ba.TRUE if value else self.ba.FALSE
995
1000
  for name, value in configuration.items()
996
1001
  }
997
- value = self[component].subs(substitutions).simplify()
1002
+ value = cast(Expression, self[component].subs(substitutions)).simplify()
998
1003
  evaluated = _constant_expression_as_bool(self.ba, value)
999
1004
 
1000
1005
  if evaluated is not None:
@@ -1047,7 +1052,7 @@ class BooleanNetwork(Dict[str, Expression]):
1047
1052
  next_configuration = {}
1048
1053
 
1049
1054
  for component, rule in self.items():
1050
- value = rule.subs(substitutions).simplify()
1055
+ value = cast(Expression, rule.subs(substitutions)).simplify()
1051
1056
  evaluated = _constant_expression_as_bool(self.ba, value)
1052
1057
 
1053
1058
  if evaluated is not None:
@@ -2105,7 +2110,11 @@ class BooleanNetworkEnsemble(MutableSequence[BooleanNetwork]):
2105
2110
  "'components' and positional networks are mutually exclusive"
2106
2111
  )
2107
2112
 
2108
- self.__ba = BooleanAlgebra() if ba is None else ba
2113
+ self.__ba = (
2114
+ BooleanAlgebra(allowed_in_token=_BOOLEAN_SYMBOL_CHARACTERS)
2115
+ if ba is None
2116
+ else ba
2117
+ )
2109
2118
  self._networks: List[BooleanNetwork] = []
2110
2119
  self._rule_cache: Dict[str, Expression] = {}
2111
2120
 
@@ -2370,6 +2379,22 @@ class BooleanNetworkEnsemble(MutableSequence[BooleanNetwork]):
2370
2379
  >>> graph.edge_frequency("B", "A", sign=1)
2371
2380
  1.0
2372
2381
 
2382
+ Feedback in the union topology need not occur in a source network:
2383
+
2384
+ >>> ensemble = BooleanNetworkEnsemble(
2385
+ ... {"A": 0, "B": "A"},
2386
+ ... {"A": "B", "B": 0},
2387
+ ... )
2388
+ >>> graph = ensemble.to_influence_graph()
2389
+ >>> sorted(graph.feedback_nodes())
2390
+ ['A', 'B']
2391
+ >>> individual = (
2392
+ ... network.to_influence_graph().feedback_nodes()
2393
+ ... for network in ensemble
2394
+ ... )
2395
+ >>> [sorted(nodes) for nodes in individual]
2396
+ [[], []]
2397
+
2373
2398
  Parameters
2374
2399
  ----------
2375
2400
  drop_isolates: bool (default: False)
@@ -2380,6 +2405,11 @@ class BooleanNetworkEnsemble(MutableSequence[BooleanNetwork]):
2380
2405
  AggregatedInfluenceGraph
2381
2406
  Aggregated signed influence graph.
2382
2407
 
2408
+ Notes
2409
+ -----
2410
+ Edge counts and frequencies are marginal. Topological structures in the
2411
+ result may combine edges from different source networks.
2412
+
2383
2413
  Raises
2384
2414
  ------
2385
2415
  ValueError
@@ -13,7 +13,13 @@ from typing import List as _List
13
13
  from ..._warnings import _warn_deprecated
14
14
  from ._algorithms import walks_from
15
15
  from ._distances import distance, similarity
16
- from ._influence_graph import AggregatedInfluenceGraph, InfluenceGraph
16
+ from ._influence_graph import (
17
+ AggregatedInfluenceGraph,
18
+ InfluenceGraph,
19
+ ensemble_feedback_edges,
20
+ ensemble_feedback_graph,
21
+ ensemble_feedback_nodes,
22
+ )
17
23
  from ._scoring import (
18
24
  infer_signed_interactions,
19
25
  infer_signed_interactions_from_walks,
@@ -26,6 +32,9 @@ __all__ = [
26
32
  "similarity",
27
33
  "AggregatedInfluenceGraph",
28
34
  "InfluenceGraph",
35
+ "ensemble_feedback_edges",
36
+ "ensemble_feedback_graph",
37
+ "ensemble_feedback_nodes",
29
38
  "infer_signed_interactions",
30
39
  "infer_signed_interactions_from_walks",
31
40
  "interaction_scores_from_walks",
@@ -3,6 +3,7 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  import warnings
6
+ from collections import Counter
6
7
  from collections.abc import Mapping as MappingInstance
7
8
  from itertools import product
8
9
  from typing import (
@@ -843,6 +844,11 @@ class InfluenceGraph(_MultiDiGraphBase):
843
844
  -------
844
845
  set of str
845
846
  Set of nodes participating in feedback structures.
847
+
848
+ Notes
849
+ -----
850
+ On an `AggregatedInfluenceGraph`, feedback is identified in the union
851
+ topology and need not occur in any individual source graph.
846
852
  """
847
853
 
848
854
  nodes = set()
@@ -2238,15 +2244,178 @@ class InfluenceGraph(_MultiDiGraphBase):
2238
2244
  seen.add(key)
2239
2245
 
2240
2246
 
2247
+ def _validate_influence_graph_ensemble(
2248
+ graphs: Sequence[InfluenceGraph],
2249
+ ) -> None:
2250
+ """Validate influence graphs used by ensemble analyses."""
2251
+
2252
+ if not graphs:
2253
+ raise ValueError("expected at least one influence graph")
2254
+
2255
+ for graph in graphs:
2256
+ if not isinstance(graph, InfluenceGraph):
2257
+ raise TypeError(
2258
+ "unsupported graph type: expected InfluenceGraph but received "
2259
+ f"{type(graph)}"
2260
+ )
2261
+
2262
+
2263
+ def ensemble_feedback_graph(
2264
+ *graphs: InfluenceGraph,
2265
+ include_selfloops: bool = True,
2266
+ ) -> "AggregatedInfluenceGraph":
2267
+ """Aggregate signed edges participating in source-level feedback.
2268
+
2269
+ Each graph is analysed independently before aggregation. An edge count is
2270
+ the number of input graphs in which that signed edge belongs to a feedback
2271
+ component, not merely the number of graphs in which the edge exists.
2272
+
2273
+ Parameters
2274
+ ----------
2275
+ *graphs: InfluenceGraph
2276
+ Influence graphs to analyse. At least one graph is required.
2277
+ include_selfloops: bool (default: True)
2278
+ Include self-loop edges as feedback.
2279
+
2280
+ Returns
2281
+ -------
2282
+ AggregatedInfluenceGraph
2283
+ Feedback graph whose edge frequencies use all input graphs as the
2284
+ denominator.
2285
+
2286
+ Raises
2287
+ ------
2288
+ TypeError
2289
+ If an input is not an `InfluenceGraph`.
2290
+ ValueError
2291
+ If no graph is provided.
2292
+ """
2293
+
2294
+ _validate_influence_graph_ensemble(graphs)
2295
+ feedback_nodes = set()
2296
+ feedback_edge_counts: Counter[Tuple[str, str, CircuitSign]] = Counter()
2297
+
2298
+ for graph in graphs:
2299
+ component_by_node = {
2300
+ node: component_index
2301
+ for component_index, component in enumerate(
2302
+ graph.strongly_connected_components(
2303
+ include_selfloops=include_selfloops,
2304
+ )
2305
+ )
2306
+ for node in component
2307
+ }
2308
+ feedback_nodes.update(component_by_node)
2309
+ graph_feedback_edges: Set[Tuple[str, str, CircuitSign]] = set()
2310
+
2311
+ for source, target, data in graph.edges(data=True):
2312
+ if source == target and not include_selfloops:
2313
+ continue
2314
+
2315
+ source_component = component_by_node.get(source)
2316
+ target_component = component_by_node.get(target)
2317
+
2318
+ if source_component is not None and source_component == target_component:
2319
+ sign = cast(CircuitSign, graph._normalize_sign(data["sign"]))
2320
+ graph_feedback_edges.add((source, target, sign))
2321
+
2322
+ feedback_edge_counts.update(graph_feedback_edges)
2323
+
2324
+ aggregated = AggregatedInfluenceGraph(total=len(graphs))
2325
+ aggregated.add_nodes_from(sorted(feedback_nodes))
2326
+
2327
+ for (source, target, sign), count in sorted(feedback_edge_counts.items()):
2328
+ aggregated.add_edge(source, target, sign=sign, count=count)
2329
+
2330
+ return aggregated
2331
+
2332
+
2333
+ def ensemble_feedback_edges(
2334
+ *graphs: InfluenceGraph,
2335
+ include_selfloops: bool = True,
2336
+ ) -> Set[Tuple[str, str, int]]:
2337
+ """Return signed edges participating in feedback in any input graph.
2338
+
2339
+ Each graph is analysed independently. An edge is retained when both ends
2340
+ belong to the same feedback-relevant strongly connected component.
2341
+
2342
+ Parameters
2343
+ ----------
2344
+ *graphs: InfluenceGraph
2345
+ Influence graphs to analyse. At least one graph is required.
2346
+ include_selfloops: bool (default: True)
2347
+ Include self-loop edges as feedback.
2348
+
2349
+ Returns
2350
+ -------
2351
+ set of tuple
2352
+ Union of `(source, target, sign)` feedback edges from the input graphs.
2353
+
2354
+ Raises
2355
+ ------
2356
+ TypeError
2357
+ If an input is not an `InfluenceGraph`.
2358
+ ValueError
2359
+ If no graph is provided.
2360
+ """
2361
+
2362
+ graph = ensemble_feedback_graph(
2363
+ *graphs,
2364
+ include_selfloops=include_selfloops,
2365
+ )
2366
+
2367
+ return {
2368
+ (source, target, int(data["sign"]))
2369
+ for source, target, data in graph.edges(data=True)
2370
+ }
2371
+
2372
+
2373
+ def ensemble_feedback_nodes(
2374
+ *graphs: InfluenceGraph,
2375
+ include_selfloops: bool = True,
2376
+ ) -> Set[str]:
2377
+ """Return feedback nodes found independently in any input graph.
2378
+
2379
+ Each graph is analysed before the resulting node sets are combined, so
2380
+ feedback structures cannot be assembled from edges in different graphs.
2381
+
2382
+ Parameters
2383
+ ----------
2384
+ *graphs: InfluenceGraph
2385
+ Influence graphs to analyse. At least one graph is required.
2386
+ include_selfloops: bool (default: True)
2387
+ Include singleton components containing a self-loop.
2388
+
2389
+ Returns
2390
+ -------
2391
+ set of str
2392
+ Union of the feedback nodes found in the input graphs.
2393
+
2394
+ Raises
2395
+ ------
2396
+ TypeError
2397
+ If an input is not an `InfluenceGraph`.
2398
+ ValueError
2399
+ If no graph is provided.
2400
+ """
2401
+
2402
+ graph = ensemble_feedback_graph(
2403
+ *graphs,
2404
+ include_selfloops=include_selfloops,
2405
+ )
2406
+
2407
+ return set(graph)
2408
+
2409
+
2241
2410
  class AggregatedInfluenceGraph(InfluenceGraph):
2242
2411
  """
2243
2412
  Influence graph aggregated across several Boolean networks or influence graphs.
2244
2413
 
2245
2414
  An `AggregatedInfluenceGraph` extends `InfluenceGraph` by requiring each
2246
2415
  edge to store an occurrence count. The count represents the number of
2247
- source graphs in which the signed influence was observed. The total number
2248
- of aggregated graphs is exposed through the `total` property and updated
2249
- through its validated setter.
2416
+ source graphs contributing the signed influence under the aggregation rule.
2417
+ The total number of aggregated graphs is exposed through the `total`
2418
+ property and updated through its validated setter.
2250
2419
 
2251
2420
  Edge frequencies are not stored as edge attributes. They are computed as:
2252
2421
 
@@ -2263,6 +2432,13 @@ class AggregatedInfluenceGraph(InfluenceGraph):
2263
2432
  >>> graph.autoregulations()
2264
2433
  []
2265
2434
 
2435
+ Notes
2436
+ -----
2437
+ The topology is the union of the source graphs. Counts and frequencies are
2438
+ marginal: paths, strongly connected components and circuits may combine
2439
+ edges from different sources and need not occur in any individual graph.
2440
+ Source-level edge co-occurrence cannot be recovered from this object alone.
2441
+
2266
2442
  Parameters
2267
2443
  ----------
2268
2444
  graph: DiGraph or MultiDiGraph, optional
@@ -3092,6 +3268,13 @@ class AggregatedInfluenceGraph(InfluenceGraph):
3092
3268
  -------
3093
3269
  AggregatedInfluenceGraph
3094
3270
  Aggregated influence graph induced by feedback nodes.
3271
+
3272
+ Notes
3273
+ -----
3274
+ Feedback is identified in the aggregated union topology. Returned nodes
3275
+ need not participate in feedback in any individual source graph. Edge
3276
+ frequencies remain marginal interaction frequencies, not feedback
3277
+ participation frequencies.
3095
3278
  """
3096
3279
 
3097
3280
  feedback_nodes = self.feedback_nodes(
@@ -3221,8 +3404,8 @@ class AggregatedInfluenceGraph(InfluenceGraph):
3221
3404
  Graph reduction applied before rendering. If `None`, render the
3222
3405
  exact aggregated graph. If `"family"`, collapse structurally
3223
3406
  equivalent nodes into families. If `"feedback"`, render the
3224
- feedback-induced subgraph. If `"both"`, render the feedback-induced
3225
- subgraph with structural families collapsed.
3407
+ feedback-induced subgraph of the aggregated union topology. If
3408
+ `"both"`, also collapse structural families in that subgraph.
3226
3409
  bins: Iterable of float or None
3227
3410
  Ordered boundaries used to classify edge frequencies, where
3228
3411
  frequency is `count / total` and ranges from 0 to 1. If `None`,
@@ -3369,8 +3552,8 @@ class AggregatedInfluenceGraph(InfluenceGraph):
3369
3552
  Graph reduction applied before rendering. If `None`, render the
3370
3553
  exact aggregated graph. If `"family"`, collapse structurally
3371
3554
  equivalent nodes into families. If `"feedback"`, render the
3372
- feedback-induced subgraph. If `"both"`, render the feedback-induced
3373
- subgraph with structural families collapsed.
3555
+ feedback-induced subgraph of the aggregated union topology. If
3556
+ `"both"`, also collapse structural families in that subgraph.
3374
3557
  bins: Iterable of float or None
3375
3558
  Ordered boundaries used to classify edge frequencies, where
3376
3559
  frequency is `count / total` and ranges from 0 to 1. If `None`,
@@ -3533,8 +3716,8 @@ class AggregatedInfluenceGraph(InfluenceGraph):
3533
3716
  Graph reduction applied before rendering. If `None`, render the
3534
3717
  exact aggregated graph. If `"family"`, collapse structurally
3535
3718
  equivalent nodes into families. If `"feedback"`, render the
3536
- feedback-induced subgraph. If `"both"`, render the feedback-induced
3537
- subgraph with structural families collapsed.
3719
+ feedback-induced subgraph of the aggregated union topology. If
3720
+ `"both"`, also collapse structural families in that subgraph.
3538
3721
  bins: Iterable of float or None
3539
3722
  Ordered boundaries used to classify edge frequencies in
3540
3723
  family-based collapse modes, where frequency is `count / total`
@@ -202,9 +202,14 @@ def _gsm_urls(
202
202
  base_url = _gsm_base_url(gsm, geo_ftp_base=geo_ftp_base)
203
203
  parser = _LinkParser()
204
204
  try:
205
- response = urlopen(base_url)
205
+ response = urlopen(Request(base_url, headers=_DOWNLOAD_HEADERS))
206
206
  except (IsADirectoryError, URLError):
207
- response = urlopen(urljoin(base_url, "index.html"))
207
+ response = urlopen(
208
+ Request(
209
+ urljoin(base_url, "index.html"),
210
+ headers=_DOWNLOAD_HEADERS,
211
+ )
212
+ )
208
213
 
209
214
  with response:
210
215
  parser.feed(response.read().decode("utf-8", errors="replace"))
@@ -454,10 +459,10 @@ def _read_10x_mtx(
454
459
  )
455
460
 
456
461
  adata = AnnData(
457
- X=counts,
458
462
  obs=pd.DataFrame(index=obs_names),
459
463
  var=var,
460
464
  )
465
+ adata.X = counts
461
466
  adata.obs.index.name = None
462
467
  adata.var.index.name = None
463
468
 
@@ -132,9 +132,11 @@ def _read_full_nestorowa(paths: Dict[str, Path]) -> AnnData:
132
132
  cell_types = cell_types.loc[cluster_ids.index, :]
133
133
  metadata, label_counts = _resolve_cell_metadata(cell_types, cluster_ids)
134
134
 
135
- adata = AnnData(X=csr_matrix(read_counts.to_numpy()))
136
- adata.obs_names = read_counts.index.astype(str).tolist()
137
- adata.var_names = read_counts.columns.astype(str).tolist()
135
+ adata = AnnData(
136
+ obs=pd.DataFrame(index=read_counts.index.astype(str).tolist()),
137
+ var=pd.DataFrame(index=read_counts.columns.astype(str).tolist()),
138
+ )
139
+ adata.X = csr_matrix(read_counts.to_numpy())
138
140
 
139
141
  adata.obs["label"] = metadata.loc[adata.obs_names, "label"].astype("category")
140
142
  adata.obs["clusters"] = _numeric_cluster_categories(cluster_ids).loc[
@@ -141,7 +141,7 @@ def graph_overlay(
141
141
  else:
142
142
  edge_graph = graph
143
143
 
144
- line_kwargs = {"linewidth": 2.5, "zorder": 10}
144
+ line_kwargs = {"linewidth": 1.5, "zorder": 10}
145
145
  line_kwargs.update(kwargs)
146
146
  edge_curves = []
147
147
 
@@ -391,7 +391,7 @@ def embedding(
391
391
  if draw_deprecated_graph or draw_deprecated_graph_labels:
392
392
  from ._graph import graph_overlay
393
393
 
394
- _kwargs = {"linewidth": 2.5, "zorder": 10}
394
+ _kwargs = {"linewidth": 1.5, "zorder": 10}
395
395
  _kwargs.update({} if "graph" not in kwargs else kwargs["graph"])
396
396
  graph_overlay(
397
397
  scdata,
@@ -111,7 +111,10 @@ def normalize(
111
111
  if sparse.issparse(matrix):
112
112
  normalized_matrix = cast(csr_matrix, cast(Any, matrix).tocsr(copy=True))
113
113
  if not np.issubdtype(normalized_matrix.dtype, np.floating):
114
- normalized_matrix = normalized_matrix.astype(np.float32)
114
+ normalized_matrix = cast(
115
+ csr_matrix,
116
+ normalized_matrix.astype(np.float32),
117
+ )
115
118
 
116
119
  counts = np.asarray(normalized_matrix.sum(axis=1)).ravel()
117
120
  counts = counts / target_sum
@@ -564,8 +564,9 @@ def umap(
564
564
  simplicial_set_embedding = _reproducible_umap_embedding(umap_umap_module)
565
565
  with threadpool_limits(limits=n_jobs):
566
566
  if a is None or b is None:
567
- a, b = _canonicalize_umap_curve_parameters(
568
- *cast(Tuple[float, float], find_ab_params(spread, min_dist))
567
+ a, b = cast(
568
+ Tuple[float, float],
569
+ find_ab_params(spread, min_dist),
569
570
  )
570
571
 
571
572
  init, graph = _umap_initialization(
@@ -639,7 +639,7 @@ def _umap_connectivities_from_knn(
639
639
 
640
640
  transpose = graph.transpose()
641
641
  intersections = graph.multiply(transpose)
642
- graph = graph + transpose - intersections
642
+ graph = cast(csr_matrix, graph + transpose - intersections)
643
643
  graph.eliminate_zeros()
644
644
 
645
645
  return cast(csr_matrix, graph.tocsr())
@@ -1245,7 +1245,7 @@ def _shared_neighborhood_weights(
1245
1245
  weights = cast(csr_matrix, weights.multiply(neighborhood_graph).tocsr())
1246
1246
  weights.eliminate_zeros()
1247
1247
  weights.sort_indices()
1248
- return weights.astype(np.float32, copy=False)
1248
+ return cast(csr_matrix, weights.astype(np.float32, copy=False))
1249
1249
 
1250
1250
 
1251
1251
  def _weighted_jaccard_connectivities(
@@ -1292,7 +1292,10 @@ def _ranked_jaccard_connectivities(
1292
1292
  def _shared_neighbor_rank_matrix(source_distances: csr_matrix) -> csr_matrix:
1293
1293
  """Encode each neighbor by its one-based distance rank."""
1294
1294
 
1295
- ranks = _binary_neighborhood_graph(source_distances).astype(np.float32)
1295
+ ranks = cast(
1296
+ csr_matrix,
1297
+ _binary_neighborhood_graph(source_distances).astype(np.float32),
1298
+ )
1296
1299
  n_rows = cast(Tuple[int, int], source_distances.shape)[0]
1297
1300
  row_sizes = np.diff(source_distances.indptr)
1298
1301
  if row_sizes.size and row_sizes[0] and np.all(row_sizes == row_sizes[0]):
@@ -23,10 +23,13 @@ BONESISTOOLS_RUN_GOLDEN=1 pytest tests/golden --golden-mode=strict
23
23
  Two comparison contracts are available:
24
24
 
25
25
  * `strict` is the default and requires bitwise equality with golden arrays. It
26
- is used by the canonical Linux job. The only numerical exception is
27
- `hvg_loess.score`, compared with `rtol=0` and `atol=2e-15`; its selected
28
- genes, mask and ranks remain exact;
29
- * `portable` is used by the macOS and Windows golden matrix entries. Stable
26
+ is selected by the adaptive GitHub-hosted Linux job unless the detected
27
+ architecture has a confirmed numerical divergence. The only numerical
28
+ exception is `hvg_loess.score`, compared with `rtol=0` and `atol=2e-15`; its
29
+ selected genes, mask and ranks remain exact;
30
+ * `portable` is selected for explicitly documented incompatible Linux
31
+ architectures, currently Emerald Rapids, Granite Rapids, Ice Lake Server and
32
+ AMD Zen 4, and is always used by the macOS and Windows matrix entries. Stable
30
33
  structures remain exact, narrowly varying floating-point stages use explicit
31
34
  tolerances, and non-convex final embeddings are checked through numerical
32
35
  and neighborhood-quality invariants.
@@ -38,6 +41,15 @@ system. Run the compatibility contract locally with:
38
41
  BONESISTOOLS_RUN_GOLDEN=1 pytest tests/golden --golden-mode=portable
39
42
  ```
40
43
 
44
+ Every executed golden run also reports SHA-256 fingerprints for the numerical
45
+ outputs of each omics workflow stage and each UMAP and t-SNE diagnostic
46
+ checkpoint. A complete run combines them into
47
+ `GOLDEN_NUMERICAL_FAMILY_SHA256`. Matching family fingerprints guarantee that
48
+ all recorded numerical array names, shapes, data types and bytes are exactly
49
+ identical, independently of whether the assertions used `strict` or
50
+ `portable`. GitHub Actions writes the family and component fingerprints to the
51
+ job summary, including when a golden assertion fails.
52
+
41
53
  ## Layout
42
54
 
43
55
  Keep frozen artifacts in this directory or a dataset-specific subdirectory: