pertpy 0.6.0__tar.gz → 0.8.0__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (216) hide show
  1. {pertpy-0.6.0 → pertpy-0.8.0}/.github/release-drafter.yml +2 -2
  2. {pertpy-0.6.0 → pertpy-0.8.0}/.github/workflows/build.yml +2 -2
  3. {pertpy-0.6.0 → pertpy-0.8.0}/.github/workflows/labeler.yml +1 -1
  4. {pertpy-0.6.0 → pertpy-0.8.0}/.github/workflows/release.yml +2 -2
  5. pertpy-0.8.0/.github/workflows/test.yml +85 -0
  6. {pertpy-0.6.0 → pertpy-0.8.0}/.gitignore +2 -0
  7. {pertpy-0.6.0 → pertpy-0.8.0}/.gitmodules +1 -1
  8. {pertpy-0.6.0 → pertpy-0.8.0}/.pre-commit-config.yaml +5 -11
  9. {pertpy-0.6.0 → pertpy-0.8.0}/.readthedocs.yml +1 -0
  10. {pertpy-0.6.0 → pertpy-0.8.0}/PKG-INFO +48 -20
  11. pertpy-0.8.0/README.md +41 -0
  12. {pertpy-0.6.0 → pertpy-0.8.0}/codecov.yml +1 -1
  13. {pertpy-0.6.0 → pertpy-0.8.0}/docs/_ext/edit_on_github.py +2 -1
  14. pertpy-0.8.0/docs/_static/docstring_previews/augur_dp_scatter.png +0 -0
  15. pertpy-0.8.0/docs/_static/docstring_previews/augur_important_features.png +0 -0
  16. pertpy-0.8.0/docs/_static/docstring_previews/augur_lollipop.png +0 -0
  17. pertpy-0.8.0/docs/_static/docstring_previews/augur_scatterplot.png +0 -0
  18. pertpy-0.8.0/docs/_static/docstring_previews/dialogue_pairplot.png +0 -0
  19. pertpy-0.8.0/docs/_static/docstring_previews/dialogue_violin.png +0 -0
  20. pertpy-0.8.0/docs/_static/docstring_previews/enrichment_dotplot.png +0 -0
  21. pertpy-0.8.0/docs/_static/docstring_previews/enrichment_gsea.png +0 -0
  22. pertpy-0.8.0/docs/_static/docstring_previews/milo_da_beeswarm.png +0 -0
  23. pertpy-0.8.0/docs/_static/docstring_previews/milo_nhood.png +0 -0
  24. pertpy-0.8.0/docs/_static/docstring_previews/milo_nhood_graph.png +0 -0
  25. pertpy-0.8.0/docs/_static/docstring_previews/mixscape_barplot.png +0 -0
  26. pertpy-0.8.0/docs/_static/docstring_previews/mixscape_heatmap.png +0 -0
  27. pertpy-0.8.0/docs/_static/docstring_previews/mixscape_lda.png +0 -0
  28. pertpy-0.8.0/docs/_static/docstring_previews/mixscape_perturbscore.png +0 -0
  29. pertpy-0.8.0/docs/_static/docstring_previews/mixscape_violin.png +0 -0
  30. pertpy-0.8.0/docs/_static/docstring_previews/sccoda_boxplots.png +0 -0
  31. pertpy-0.8.0/docs/_static/docstring_previews/sccoda_effects_barplot.png +0 -0
  32. pertpy-0.8.0/docs/_static/docstring_previews/sccoda_rel_abundance_dispersion_plot.png +0 -0
  33. pertpy-0.8.0/docs/_static/docstring_previews/sccoda_stacked_barplot.png +0 -0
  34. pertpy-0.8.0/docs/_static/docstring_previews/scgen_reg_mean.png +0 -0
  35. pertpy-0.8.0/docs/_static/docstring_previews/tasccoda_draw_effects.png +0 -0
  36. pertpy-0.8.0/docs/_static/docstring_previews/tasccoda_draw_tree.png +0 -0
  37. pertpy-0.8.0/docs/_static/docstring_previews/tasccoda_effects_umap.png +0 -0
  38. pertpy-0.8.0/docs/_static/tutorials/augur.png +0 -0
  39. pertpy-0.8.0/docs/_static/tutorials/cinemaot.png +0 -0
  40. pertpy-0.8.0/docs/_static/tutorials/dge.png +0 -0
  41. pertpy-0.8.0/docs/_static/tutorials/dialogue.png +0 -0
  42. pertpy-0.8.0/docs/_static/tutorials/enrichment.png +0 -0
  43. pertpy-0.8.0/docs/_static/tutorials/metadata.png +0 -0
  44. pertpy-0.8.0/docs/_static/tutorials/milo.png +0 -0
  45. pertpy-0.8.0/docs/_static/tutorials/mixscape.png +0 -0
  46. pertpy-0.8.0/docs/_static/tutorials/perturbation_space.png +0 -0
  47. {pertpy-0.6.0 → pertpy-0.8.0}/docs/_templates/autosummary/class.rst +17 -3
  48. {pertpy-0.6.0 → pertpy-0.8.0}/docs/conf.py +19 -10
  49. {pertpy-0.6.0 → pertpy-0.8.0}/docs/contributing.md +2 -2
  50. {pertpy-0.6.0 → pertpy-0.8.0}/docs/index.md +2 -12
  51. {pertpy-0.6.0 → pertpy-0.8.0}/docs/installation.md +40 -19
  52. {pertpy-0.6.0 → pertpy-0.8.0}/docs/tutorials/index.md +8 -6
  53. pertpy-0.8.0/docs/usage/usage.md +607 -0
  54. {pertpy-0.6.0 → pertpy-0.8.0}/pertpy/__init__.py +4 -2
  55. pertpy-0.8.0/pertpy/data/__init__.py +117 -0
  56. pertpy-0.8.0/pertpy/data/_dataloader.py +70 -0
  57. {pertpy-0.6.0 → pertpy-0.8.0}/pertpy/data/_datasets.py +261 -92
  58. pertpy-0.8.0/pertpy/metadata/__init__.py +6 -0
  59. pertpy-0.8.0/pertpy/metadata/_cell_line.py +795 -0
  60. pertpy-0.8.0/pertpy/metadata/_compound.py +128 -0
  61. pertpy-0.8.0/pertpy/metadata/_drug.py +238 -0
  62. pertpy-0.8.0/pertpy/metadata/_look_up.py +569 -0
  63. pertpy-0.8.0/pertpy/metadata/_metadata.py +70 -0
  64. pertpy-0.8.0/pertpy/metadata/_moa.py +125 -0
  65. {pertpy-0.6.0 → pertpy-0.8.0}/pertpy/preprocessing/__init__.py +2 -0
  66. {pertpy-0.6.0 → pertpy-0.8.0}/pertpy/preprocessing/_guide_rna.py +89 -6
  67. pertpy-0.8.0/pertpy/tools/__init__.py +57 -0
  68. {pertpy-0.6.0 → pertpy-0.8.0}/pertpy/tools/_augur.py +329 -32
  69. {pertpy-0.6.0 → pertpy-0.8.0}/pertpy/tools/_cinemaot.py +145 -6
  70. {pertpy-0.6.0 → pertpy-0.8.0}/pertpy/tools/_coda/_base_coda.py +1237 -116
  71. {pertpy-0.6.0 → pertpy-0.8.0}/pertpy/tools/_coda/_sccoda.py +66 -36
  72. {pertpy-0.6.0 → pertpy-0.8.0}/pertpy/tools/_coda/_tasccoda.py +46 -39
  73. {pertpy-0.6.0 → pertpy-0.8.0}/pertpy/tools/_dialogue.py +180 -77
  74. pertpy-0.8.0/pertpy/tools/_differential_gene_expression/__init__.py +20 -0
  75. pertpy-0.8.0/pertpy/tools/_differential_gene_expression/_base.py +657 -0
  76. pertpy-0.8.0/pertpy/tools/_differential_gene_expression/_checks.py +41 -0
  77. pertpy-0.8.0/pertpy/tools/_differential_gene_expression/_dge_comparison.py +86 -0
  78. pertpy-0.8.0/pertpy/tools/_differential_gene_expression/_edger.py +125 -0
  79. pertpy-0.8.0/pertpy/tools/_differential_gene_expression/_formulaic.py +189 -0
  80. pertpy-0.8.0/pertpy/tools/_differential_gene_expression/_pydeseq2.py +95 -0
  81. pertpy-0.8.0/pertpy/tools/_differential_gene_expression/_simple_tests.py +162 -0
  82. pertpy-0.8.0/pertpy/tools/_differential_gene_expression/_statsmodels.py +72 -0
  83. {pertpy-0.6.0 → pertpy-0.8.0}/pertpy/tools/_distances/_distance_tests.py +29 -24
  84. pertpy-0.8.0/pertpy/tools/_distances/_distances.py +1195 -0
  85. pertpy-0.8.0/pertpy/tools/_enrichment.py +460 -0
  86. {pertpy-0.6.0 → pertpy-0.8.0}/pertpy/tools/_kernel_pca.py +1 -1
  87. {pertpy-0.6.0 → pertpy-0.8.0}/pertpy/tools/_milo.py +406 -49
  88. pertpy-0.8.0/pertpy/tools/_mixscape.py +1125 -0
  89. {pertpy-0.6.0 → pertpy-0.8.0}/pertpy/tools/_perturbation_space/_clustering.py +10 -3
  90. pertpy-0.8.0/pertpy/tools/_perturbation_space/_comparison.py +112 -0
  91. pertpy-0.8.0/pertpy/tools/_perturbation_space/_discriminator_classifiers.py +524 -0
  92. {pertpy-0.6.0 → pertpy-0.8.0}/pertpy/tools/_perturbation_space/_perturbation_space.py +146 -52
  93. {pertpy-0.6.0 → pertpy-0.8.0}/pertpy/tools/_perturbation_space/_simple.py +52 -11
  94. pertpy-0.8.0/pertpy/tools/_scgen/__init__.py +1 -0
  95. {pertpy-0.6.0 → pertpy-0.8.0}/pertpy/tools/_scgen/_base_components.py +2 -3
  96. pertpy-0.8.0/pertpy/tools/_scgen/_scgen.py +706 -0
  97. {pertpy-0.6.0 → pertpy-0.8.0}/pertpy/tools/_scgen/_utils.py +3 -5
  98. pertpy-0.8.0/pertpy/tools/decoupler_LICENSE +674 -0
  99. {pertpy-0.6.0 → pertpy-0.8.0}/pyproject.toml +47 -18
  100. pertpy-0.8.0/tests/conftest.py +20 -0
  101. pertpy-0.8.0/tests/metadata/test_cell_line.py +82 -0
  102. pertpy-0.8.0/tests/metadata/test_compound.py +44 -0
  103. pertpy-0.8.0/tests/metadata/test_drug.py +36 -0
  104. pertpy-0.8.0/tests/metadata/test_moa.py +50 -0
  105. {pertpy-0.6.0 → pertpy-0.8.0}/tests/preprocessing/test_grna_assignment.py +1 -1
  106. pertpy-0.8.0/tests/tools/_coda/test_sccoda.py +113 -0
  107. pertpy-0.8.0/tests/tools/_coda/test_tasccoda.py +76 -0
  108. pertpy-0.8.0/tests/tools/_differential_gene_expression/__init__.py +0 -0
  109. pertpy-0.8.0/tests/tools/_differential_gene_expression/conftest.py +64 -0
  110. pertpy-0.8.0/tests/tools/_differential_gene_expression/test_base.py +86 -0
  111. pertpy-0.8.0/tests/tools/_differential_gene_expression/test_compare_groups.py +58 -0
  112. pertpy-0.8.0/tests/tools/_differential_gene_expression/test_dge.py +80 -0
  113. pertpy-0.8.0/tests/tools/_differential_gene_expression/test_edger.py +33 -0
  114. pertpy-0.8.0/tests/tools/_differential_gene_expression/test_formulaic.py +208 -0
  115. pertpy-0.8.0/tests/tools/_differential_gene_expression/test_input_checks.py +73 -0
  116. pertpy-0.8.0/tests/tools/_differential_gene_expression/test_pydeseq2.py +33 -0
  117. pertpy-0.8.0/tests/tools/_differential_gene_expression/test_simple_tests.py +113 -0
  118. pertpy-0.8.0/tests/tools/_differential_gene_expression/test_statsmodels.py +30 -0
  119. pertpy-0.8.0/tests/tools/_distances/test_distance_tests.py +56 -0
  120. pertpy-0.8.0/tests/tools/_distances/test_distances.py +208 -0
  121. pertpy-0.8.0/tests/tools/_perturbation_space/test_comparison.py +29 -0
  122. pertpy-0.6.0/tests/tools/_perturbation_space/test_discriminator_classifier.py → pertpy-0.8.0/tests/tools/_perturbation_space/test_discriminator_classifiers.py +30 -7
  123. {pertpy-0.6.0 → pertpy-0.8.0}/tests/tools/_perturbation_space/test_simple_perturbation_space.py +56 -73
  124. pertpy-0.8.0/tests/tools/test_augur.py +181 -0
  125. pertpy-0.8.0/tests/tools/test_cinemaot.py +83 -0
  126. pertpy-0.8.0/tests/tools/test_dialogue.py +37 -0
  127. pertpy-0.8.0/tests/tools/test_enrichment.py +63 -0
  128. pertpy-0.8.0/tests/tools/test_milo.py +283 -0
  129. pertpy-0.8.0/tests/tools/test_mixscape.py +100 -0
  130. pertpy-0.6.0/tests/tools/test_jax_scgen.py → pertpy-0.8.0/tests/tools/test_scgen.py +9 -10
  131. pertpy-0.6.0/.github/workflows/test.yml +0 -58
  132. pertpy-0.6.0/.prettierignore +0 -1
  133. pertpy-0.6.0/README.md +0 -29
  134. pertpy-0.6.0/docs/_static/tutorials/augur.png +0 -0
  135. pertpy-0.6.0/docs/_static/tutorials/dialogue.png +0 -0
  136. pertpy-0.6.0/docs/_static/tutorials/milo.png +0 -0
  137. pertpy-0.6.0/docs/_static/tutorials/mixscape.png +0 -0
  138. pertpy-0.6.0/docs/_static/tutorials/scgen_batch_removal.png +0 -0
  139. pertpy-0.6.0/docs/authors.md +0 -13
  140. pertpy-0.6.0/docs/usage/usage.md +0 -612
  141. pertpy-0.6.0/pertpy/data/__init__.py +0 -52
  142. pertpy-0.6.0/pertpy/data/_dataloader.py +0 -68
  143. pertpy-0.6.0/pertpy/plot/__init__.py +0 -13
  144. pertpy-0.6.0/pertpy/plot/_augur.py +0 -234
  145. pertpy-0.6.0/pertpy/plot/_cinemaot.py +0 -81
  146. pertpy-0.6.0/pertpy/plot/_coda.py +0 -1001
  147. pertpy-0.6.0/pertpy/plot/_dialogue.py +0 -91
  148. pertpy-0.6.0/pertpy/plot/_guide_rna.py +0 -82
  149. pertpy-0.6.0/pertpy/plot/_milopy.py +0 -284
  150. pertpy-0.6.0/pertpy/plot/_mixscape.py +0 -594
  151. pertpy-0.6.0/pertpy/plot/_scgen.py +0 -337
  152. pertpy-0.6.0/pertpy/tools/__init__.py +0 -24
  153. pertpy-0.6.0/pertpy/tools/_differential_gene_expression.py +0 -99
  154. pertpy-0.6.0/pertpy/tools/_distances/_distances.py +0 -709
  155. pertpy-0.6.0/pertpy/tools/_metadata/_cell_line.py +0 -613
  156. pertpy-0.6.0/pertpy/tools/_metadata/_look_up.py +0 -342
  157. pertpy-0.6.0/pertpy/tools/_mixscape.py +0 -503
  158. pertpy-0.6.0/pertpy/tools/_perturbation_space/_discriminator_classifier.py +0 -381
  159. pertpy-0.6.0/pertpy/tools/_scgen/__init__.py +0 -1
  160. pertpy-0.6.0/pertpy/tools/_scgen/_jax_scgen.py +0 -370
  161. pertpy-0.6.0/tests/__init__.py +0 -1
  162. pertpy-0.6.0/tests/tools/_coda/test_sccoda.py +0 -107
  163. pertpy-0.6.0/tests/tools/_coda/test_tasccoda.py +0 -73
  164. pertpy-0.6.0/tests/tools/_distances/test_distance_tests.py +0 -47
  165. pertpy-0.6.0/tests/tools/_distances/test_distances.py +0 -123
  166. pertpy-0.6.0/tests/tools/_metadata/test_cell_line.py +0 -93
  167. pertpy-0.6.0/tests/tools/test_augur.py +0 -180
  168. pertpy-0.6.0/tests/tools/test_cinemaot.py +0 -83
  169. pertpy-0.6.0/tests/tools/test_milo.py +0 -263
  170. pertpy-0.6.0/tests/tools/test_mixscape.py +0 -97
  171. {pertpy-0.6.0 → pertpy-0.8.0}/.editorconfig +0 -0
  172. {pertpy-0.6.0 → pertpy-0.8.0}/.gitattributes +0 -0
  173. {pertpy-0.6.0 → pertpy-0.8.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  174. {pertpy-0.6.0 → pertpy-0.8.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  175. {pertpy-0.6.0 → pertpy-0.8.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  176. {pertpy-0.6.0 → pertpy-0.8.0}/.github/labels.yml +0 -0
  177. {pertpy-0.6.0 → pertpy-0.8.0}/.github/pull_request_template.md +0 -0
  178. {pertpy-0.6.0 → pertpy-0.8.0}/.github/workflows/release_drafter.yml +0 -0
  179. {pertpy-0.6.0 → pertpy-0.8.0}/CODE_OF_CONDUCT.md +0 -0
  180. {pertpy-0.6.0 → pertpy-0.8.0}/LICENSE +0 -0
  181. {pertpy-0.6.0 → pertpy-0.8.0}/docs/Makefile +0 -0
  182. {pertpy-0.6.0 → pertpy-0.8.0}/docs/_ext/typed_returns.py +0 -0
  183. {pertpy-0.6.0 → pertpy-0.8.0}/docs/_static/SCVI_LICENSE +0 -0
  184. {pertpy-0.6.0 → pertpy-0.8.0}/docs/_static/css/overwrite.css +0 -0
  185. {pertpy-0.6.0 → pertpy-0.8.0}/docs/_static/css/sphinx_gallery.css +0 -0
  186. {pertpy-0.6.0 → pertpy-0.8.0}/docs/_static/icons/code-24px.svg +0 -0
  187. {pertpy-0.6.0 → pertpy-0.8.0}/docs/_static/icons/computer-24px.svg +0 -0
  188. {pertpy-0.6.0 → pertpy-0.8.0}/docs/_static/icons/library_books-24px.svg +0 -0
  189. {pertpy-0.6.0 → pertpy-0.8.0}/docs/_static/icons/play_circle_outline-24px.svg +0 -0
  190. {pertpy-0.6.0 → pertpy-0.8.0}/docs/_static/placeholder.png +0 -0
  191. {pertpy-0.6.0 → pertpy-0.8.0}/docs/_static/tutorials/distances.png +0 -0
  192. {pertpy-0.6.0 → pertpy-0.8.0}/docs/_static/tutorials/distances_tests.png +0 -0
  193. {pertpy-0.6.0 → pertpy-0.8.0}/docs/_static/tutorials/guide_rna_assignment.png +0 -0
  194. {pertpy-0.6.0 → pertpy-0.8.0}/docs/_static/tutorials/ontology.png +0 -0
  195. {pertpy-0.6.0 → pertpy-0.8.0}/docs/_static/tutorials/placeholder.png +0 -0
  196. {pertpy-0.6.0 → pertpy-0.8.0}/docs/_static/tutorials/sccoda.png +0 -0
  197. {pertpy-0.6.0 → pertpy-0.8.0}/docs/_static/tutorials/sccoda_extended.png +0 -0
  198. {pertpy-0.6.0 → pertpy-0.8.0}/docs/_static/tutorials/scgen_perturbation_prediction.png +0 -0
  199. {pertpy-0.6.0 → pertpy-0.8.0}/docs/_static/tutorials/tasccoda.png +0 -0
  200. {pertpy-0.6.0 → pertpy-0.8.0}/docs/_templates/class_no_inherited.rst +0 -0
  201. {pertpy-0.6.0 → pertpy-0.8.0}/docs/code_of_conduct.md +0 -0
  202. {pertpy-0.6.0 → pertpy-0.8.0}/docs/make.bat +0 -0
  203. {pertpy-0.6.0 → pertpy-0.8.0}/docs/references.bib +0 -0
  204. {pertpy-0.6.0 → pertpy-0.8.0}/docs/references.md +0 -0
  205. {pertpy-0.6.0 → pertpy-0.8.0}/docs/utils.py +0 -0
  206. {pertpy-0.6.0/pertpy/tools/_coda → pertpy-0.8.0/pertpy/plot}/__init__.py +0 -0
  207. {pertpy-0.6.0 → pertpy-0.8.0}/pertpy/py.typed +0 -0
  208. {pertpy-0.6.0/pertpy/tools/_distances → pertpy-0.8.0/pertpy/tools/_coda}/__init__.py +0 -0
  209. {pertpy-0.6.0/pertpy/tools/_metadata → pertpy-0.8.0/pertpy/tools/_distances}/__init__.py +0 -0
  210. {pertpy-0.6.0 → pertpy-0.8.0}/pertpy/tools/_perturbation_space/__init__.py +0 -0
  211. {pertpy-0.6.0 → pertpy-0.8.0}/pertpy/tools/_perturbation_space/_metrics.py +0 -0
  212. /pertpy-0.6.0/pertpy/tools/_scgen/_jax_scgenvae.py → /pertpy-0.8.0/pertpy/tools/_scgen/_scgenvae.py +0 -0
  213. {pertpy-0.6.0 → pertpy-0.8.0}/pertpy/tools/transferlearning_MMD_LICENSE +0 -0
  214. {pertpy-0.6.0 → pertpy-0.8.0}/tests/tools/_perturbation_space/test_simple_cluster_space.py +0 -0
  215. {pertpy-0.6.0 → pertpy-0.8.0}/tests/tools/haber_data.csv +0 -0
  216. {pertpy-0.6.0 → pertpy-0.8.0}/tests/tools/r_result.csv +0 -0
@@ -1,5 +1,5 @@
1
- name-template: "0.6.0 🌈" # <<COOKIETEMPLE_FORCE_BUMP>>
2
- tag-template: 0.6.0 # <<COOKIETEMPLE_FORCE_BUMP>>
1
+ name-template: "0.8.0 🌈"
2
+ tag-template: 0.8.0
3
3
  exclude-labels:
4
4
  - "skip-changelog"
5
5
 
@@ -14,10 +14,10 @@ jobs:
14
14
  package:
15
15
  runs-on: ubuntu-latest
16
16
  steps:
17
- - uses: actions/checkout@v3
17
+ - uses: actions/checkout@v4
18
18
 
19
19
  - name: Set up Python 3.11
20
- uses: actions/setup-python@v4
20
+ uses: actions/setup-python@v5
21
21
  with:
22
22
  python-version: "3.11"
23
23
  cache: "pip"
@@ -11,7 +11,7 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
13
  - name: Check out the repository
14
- uses: actions/checkout@v3
14
+ uses: actions/checkout@v4
15
15
 
16
16
  - name: Run Labeler
17
17
  uses: crazy-max/ghaction-github-labeler@v4.1.0
@@ -11,10 +11,10 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
13
  - name: Checkout code
14
- uses: actions/checkout@v3
14
+ uses: actions/checkout@v4
15
15
 
16
16
  - name: Set up Python 3.11
17
- uses: actions/setup-python@v4
17
+ uses: actions/setup-python@v5
18
18
  with:
19
19
  python-version: "3.11"
20
20
 
@@ -0,0 +1,85 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ concurrency:
10
+ group: ${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ jobs:
14
+ test:
15
+ runs-on: ${{ matrix.os }}
16
+ defaults:
17
+ run:
18
+ shell: bash -e {0} # -e to fail on error
19
+
20
+ strategy:
21
+ fail-fast: false
22
+ matrix:
23
+ include:
24
+ - os: ubuntu-latest
25
+ python: "3.10"
26
+ run_mode: "slow"
27
+ - os: ubuntu-latest
28
+ python: "3.11"
29
+ run_mode: "slow"
30
+ - os: ubuntu-latest
31
+ python: "3.11"
32
+ run_mode: "fast"
33
+ - os: ubuntu-latest
34
+ python: "3.11"
35
+ run_mode: slow
36
+ pip-flags: "--pre"
37
+
38
+ env:
39
+ OS: ${{ matrix.os }}
40
+ PYTHON: ${{ matrix.python }}
41
+
42
+ steps:
43
+ - uses: actions/checkout@v4
44
+ - name: Set up Python ${{ matrix.python }}
45
+ uses: actions/setup-python@v5
46
+ with:
47
+ python-version: ${{ matrix.python }}
48
+
49
+ - uses: actions/checkout@v4
50
+ - name: Install R
51
+ uses: r-lib/actions/setup-r@v2
52
+ with:
53
+ r-version: "4"
54
+
55
+ - name: Install edgeR
56
+ run: Rscript --vanilla -e "install.packages(c('BiocManager', 'statmod'), repos='https://cran.r-project.org'); library('BiocManager'); BiocManager::install('edgeR')"
57
+
58
+ - name: Install test dependencies
59
+ run: python -m pip install --upgrade uv wheel
60
+ - name: Install dependencies
61
+ run: |
62
+ uv pip install --system rpy2
63
+ uv pip install --system ${{ matrix.pip-flags }} ".[dev,test,coda,de]"
64
+
65
+ - name: Test
66
+ env:
67
+ MPLBACKEND: agg
68
+ PLATFORM: ${{ matrix.os }}
69
+ DISPLAY: :42
70
+ run: |
71
+ pytest_args="-m pytest -v --color=yes"
72
+ if [ "${{ matrix.run_mode }}" = "slow" ]; then
73
+ pytest_args="$pytest_args --runslow"
74
+ fi
75
+ coverage run $pytest_args
76
+
77
+ - name: Show coverage report
78
+ run: coverage report -m
79
+
80
+ - name: Upload coverage
81
+ uses: codecov/codecov-action@v4
82
+ with:
83
+ token: ${{ secrets.CODECOV_TOKEN }}
84
+ fail_ci_if_error: true
85
+ verbose: true
@@ -153,3 +153,5 @@ cache
153
153
 
154
154
  lightning_logs/*
155
155
  */lightning_logs/*
156
+
157
+ node_modules
@@ -1,3 +1,3 @@
1
1
  [submodule "docs/notebooks"]
2
2
  path = docs/tutorials/notebooks
3
- url = https://github.com/theislab/pertpy-tutorials/
3
+ url = https://github.com/scverse/pertpy-tutorials/
@@ -7,23 +7,17 @@ default_stages:
7
7
  minimum_pre_commit_version: 2.16.0
8
8
  repos:
9
9
  - repo: https://github.com/pre-commit/mirrors-prettier
10
- rev: v3.0.3
10
+ rev: v4.0.0-alpha.8
11
11
  hooks:
12
12
  - id: prettier
13
- # Newer versions of node don't work on systems that have an older version of GLIBC
14
- # (in particular Ubuntu 18.04 and Centos 7)
15
- # EOL of Centos 7 is in 2024-06, we can probably get rid of this then.
16
- # See https://github.com/scverse/cookiecutter-scverse/issues/143 and
17
- # https://github.com/jupyterlab/jupyterlab/issues/12675
18
- language_version: "17.9.1"
19
13
  - repo: https://github.com/astral-sh/ruff-pre-commit
20
- rev: v0.1.3
14
+ rev: v0.4.7
21
15
  hooks:
22
16
  - id: ruff
23
- args: [--fix, --exit-non-zero-on-fix]
17
+ args: [--fix, --exit-non-zero-on-fix, --unsafe-fixes]
24
18
  - id: ruff-format
25
19
  - repo: https://github.com/pre-commit/pre-commit-hooks
26
- rev: v4.5.0
20
+ rev: v4.6.0
27
21
  hooks:
28
22
  - id: detect-private-key
29
23
  - id: check-ast
@@ -33,7 +27,7 @@ repos:
33
27
  - id: trailing-whitespace
34
28
  - id: check-case-conflict
35
29
  - repo: https://github.com/pre-commit/mirrors-mypy
36
- rev: v1.6.1
30
+ rev: v1.10.0
37
31
  hooks:
38
32
  - id: mypy
39
33
  args: [--no-strict-optional, --ignore-missing-imports]
@@ -17,6 +17,7 @@ python:
17
17
  extra_requirements:
18
18
  - doc
19
19
  - coda
20
+ - de
20
21
 
21
22
  submodules:
22
23
  include: all
@@ -1,11 +1,11 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: pertpy
3
- Version: 0.6.0
3
+ Version: 0.8.0
4
4
  Summary: Perturbation Analysis in the scverse ecosystem.
5
5
  Project-URL: Documentation, https://pertpy.readthedocs.io
6
- Project-URL: Source, https://github.com/theislab/pertpy
7
- Project-URL: Home-page, https://github.com/theislab/pertpy
8
- Author: Lukas Heumos, Yuge Ji, Alejandro Tejada, Johannes Köster, Emma Dann, Xinyue Zhang, Xichen Wu, Amir Moinfar, Sergei Rybakov, Tessa Green, Stefan Peidli, Antonia Schumacher
6
+ Project-URL: Source, https://github.com/scverse/pertpy
7
+ Project-URL: Home-page, https://github.com/scverse/pertpy
8
+ Author: Lukas Heumos, Yuge Ji, Lilly May, Alejandro Tejada, Johannes Köster, Emma Dann, Xinyue Zhang, Xichen Wu, Tessa Green, Stefan Peidli, Antonia Schumacher, Gregor Sturm
9
9
  Maintainer-email: Lukas Heumos <lukas.heumos@posteo.net>
10
10
  License: MIT License
11
11
 
@@ -29,18 +29,30 @@ License: MIT License
29
29
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30
30
  SOFTWARE.
31
31
  License-File: LICENSE
32
- Requires-Python: >=3.9
32
+ Classifier: Development Status :: 4 - Beta
33
+ Classifier: Environment :: Console
34
+ Classifier: Framework :: Jupyter
35
+ Classifier: Intended Audience :: Developers
36
+ Classifier: Intended Audience :: Science/Research
37
+ Classifier: License :: OSI Approved :: Apache Software License
38
+ Classifier: Natural Language :: English
39
+ Classifier: Operating System :: MacOS :: MacOS X
40
+ Classifier: Operating System :: POSIX :: Linux
41
+ Classifier: Programming Language :: Python :: 3
42
+ Classifier: Programming Language :: Python :: 3.10
43
+ Classifier: Programming Language :: Python :: 3.11
44
+ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
45
+ Classifier: Topic :: Scientific/Engineering :: Visualization
46
+ Requires-Python: >=3.10
33
47
  Requires-Dist: adjusttext
34
- Requires-Dist: anndata
35
- Requires-Dist: arviz
48
+ Requires-Dist: blitzgsea
36
49
  Requires-Dist: decoupler
37
- Requires-Dist: ipywidgets
50
+ Requires-Dist: lamin-utils
38
51
  Requires-Dist: muon
39
- Requires-Dist: numba
40
- Requires-Dist: numpyro
41
52
  Requires-Dist: openpyxl
42
53
  Requires-Dist: ott-jax
43
- Requires-Dist: plotnine
54
+ Requires-Dist: pubchempy
55
+ Requires-Dist: pyarrow
44
56
  Requires-Dist: requests
45
57
  Requires-Dist: rich
46
58
  Requires-Dist: scanpy[leiden]
@@ -48,10 +60,14 @@ Requires-Dist: scikit-misc
48
60
  Requires-Dist: scipy
49
61
  Requires-Dist: scvi-tools
50
62
  Requires-Dist: sparsecca
51
- Requires-Dist: toytree
52
63
  Provides-Extra: coda
64
+ Requires-Dist: arviz; extra == 'coda'
53
65
  Requires-Dist: ete3; extra == 'coda'
54
66
  Requires-Dist: pyqt5; extra == 'coda'
67
+ Requires-Dist: toytree; extra == 'coda'
68
+ Provides-Extra: de
69
+ Requires-Dist: formulaic; extra == 'de'
70
+ Requires-Dist: pydeseq2; extra == 'de'
55
71
  Provides-Extra: dev
56
72
  Requires-Dist: pre-commit; extra == 'dev'
57
73
  Provides-Extra: doc
@@ -76,23 +92,23 @@ Requires-Dist: sphinx>=4; extra == 'doc'
76
92
  Requires-Dist: sphinxcontrib-bibtex>=1.0.0; extra == 'doc'
77
93
  Requires-Dist: sphinxext-opengraph; extra == 'doc'
78
94
  Provides-Extra: test
95
+ Requires-Dist: coverage; extra == 'test'
79
96
  Requires-Dist: pytest; extra == 'test'
80
- Requires-Dist: pytest-cov; extra == 'test'
81
97
  Description-Content-Type: text/markdown
82
98
 
83
99
  [![Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
84
- [![Build](https://github.com/theislab/pertpy/actions/workflows/build.yml/badge.svg)](https://github.com/theislab/pertpy/actions/workflows/build.yml)
85
- [![Codecov](https://codecov.io/gh/theislab/pertpy/branch/master/graph/badge.svg)](https://codecov.io/gh/theislab/pertpy)
86
- [![License](https://img.shields.io/github/license/theislab/pertpy)](https://opensource.org/licenses/Apache2.0)
100
+ [![Build](https://github.com/scverse/pertpy/actions/workflows/build.yml/badge.svg)](https://github.com/scverse/pertpy/actions/workflows/build.yml)
101
+ [![codecov](https://codecov.io/gh/scverse/pertpy/graph/badge.svg?token=1dTpIPBShv)](https://codecov.io/gh/scverse/pertpy)
102
+ [![License](https://img.shields.io/github/license/scverse/pertpy)](https://opensource.org/licenses/Apache2.0)
87
103
  [![PyPI](https://img.shields.io/pypi/v/pertpy.svg)](https://pypi.org/project/pertpy/)
88
104
  [![Python Version](https://img.shields.io/pypi/pyversions/pertpy)](https://pypi.org/project/pertpy)
89
105
  [![Read the Docs](https://img.shields.io/readthedocs/pertpy/latest.svg?label=Read%20the%20Docs)](https://pertpy.readthedocs.io/)
90
- [![Test](https://github.com/theislab/pertpy/actions/workflows/test.yml/badge.svg)](https://github.com/theislab/pertpy/actions/workflows/test.yml)
106
+ [![Test](https://github.com/scverse/pertpy/actions/workflows/test.yml/badge.svg)](https://github.com/scverse/pertpy/actions/workflows/test.yml)
91
107
  [![PyPI](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
92
108
 
93
109
  # pertpy
94
110
 
95
- ![pertpy-wide1](https://user-images.githubusercontent.com/21954664/235677503-0c72f90d-3f6d-4a16-a1ff-ff8c11a540fb.png)
111
+ ![fig1](https://github.com/scverse/pertpy/assets/99650244/182fa9c3-6d23-4002-b86a-82bf2a243377)
96
112
 
97
113
  ## Documentation
98
114
 
@@ -103,7 +119,19 @@ Please read the [documentation](https://pertpy.readthedocs.io/en/latest).
103
119
  You can install _pertpy_ via [pip] from [PyPI]:
104
120
 
105
121
  ```console
106
- $ pip install pertpy
122
+ pip install pertpy
123
+ ```
124
+
125
+ if you want to use scCODA or tascCODA, please install pertpy as follows:
126
+
127
+ ```console
128
+ pip install pertpy[coda]
129
+ ```
130
+
131
+ If you want to use the differential gene expression interface, please install pertpy by running:
132
+
133
+ ```console
134
+ pip install pertpy[de]
107
135
  ```
108
136
 
109
137
  [pip]: https://pip.pypa.io/
pertpy-0.8.0/README.md ADDED
@@ -0,0 +1,41 @@
1
+ [![Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
2
+ [![Build](https://github.com/scverse/pertpy/actions/workflows/build.yml/badge.svg)](https://github.com/scverse/pertpy/actions/workflows/build.yml)
3
+ [![codecov](https://codecov.io/gh/scverse/pertpy/graph/badge.svg?token=1dTpIPBShv)](https://codecov.io/gh/scverse/pertpy)
4
+ [![License](https://img.shields.io/github/license/scverse/pertpy)](https://opensource.org/licenses/Apache2.0)
5
+ [![PyPI](https://img.shields.io/pypi/v/pertpy.svg)](https://pypi.org/project/pertpy/)
6
+ [![Python Version](https://img.shields.io/pypi/pyversions/pertpy)](https://pypi.org/project/pertpy)
7
+ [![Read the Docs](https://img.shields.io/readthedocs/pertpy/latest.svg?label=Read%20the%20Docs)](https://pertpy.readthedocs.io/)
8
+ [![Test](https://github.com/scverse/pertpy/actions/workflows/test.yml/badge.svg)](https://github.com/scverse/pertpy/actions/workflows/test.yml)
9
+ [![PyPI](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
10
+
11
+ # pertpy
12
+
13
+ ![fig1](https://github.com/scverse/pertpy/assets/99650244/182fa9c3-6d23-4002-b86a-82bf2a243377)
14
+
15
+ ## Documentation
16
+
17
+ Please read the [documentation](https://pertpy.readthedocs.io/en/latest).
18
+
19
+ ## Installation
20
+
21
+ You can install _pertpy_ via [pip] from [PyPI]:
22
+
23
+ ```console
24
+ pip install pertpy
25
+ ```
26
+
27
+ if you want to use scCODA or tascCODA, please install pertpy as follows:
28
+
29
+ ```console
30
+ pip install pertpy[coda]
31
+ ```
32
+
33
+ If you want to use the differential gene expression interface, please install pertpy by running:
34
+
35
+ ```console
36
+ pip install pertpy[de]
37
+ ```
38
+
39
+ [pip]: https://pip.pypa.io/
40
+ [pypi]: https://pypi.org/
41
+ [usage]: https://pertpy.readthedocs.io/en/latest/usage/usage.html
@@ -5,7 +5,7 @@ coverage:
5
5
  status:
6
6
  project:
7
7
  default:
8
- # Require 1% coverage, i.e., always succeed
8
+ # Require 1% coverage, i.e., succeed as long as coverage collection works
9
9
  target: 1
10
10
  patch: false
11
11
  changes: false
@@ -1,4 +1,5 @@
1
1
  """Based on gist.github.com/MantasVaitkunas/7c16de233812adcb7028."""
2
+
2
3
  import os
3
4
  from typing import Any
4
5
 
@@ -36,7 +37,7 @@ def _html_page_context(
36
37
 
37
38
  # For sphinx_rtd_theme.
38
39
  context["display_github"] = True
39
- context["github_user"] = "theislab"
40
+ context["github_user"] = "scverse"
40
41
  context["github_version"] = "master"
41
42
  context["github_repo"] = repo
42
43
  context["conf_py_path"] = "/docs/source/"
@@ -24,11 +24,25 @@ Methods table
24
24
  ~~~~~~~~~~~~~
25
25
 
26
26
  .. autosummary::
27
+
28
+ {% set plotting_methods = [] %}
29
+ {% set other_methods = [] %}
30
+
27
31
  {% for item in methods %}
28
- {%- if item != '__init__' %}
32
+ {%- if item.startswith('plot_') %}
33
+ {%- set _ = plotting_methods.append(item) %}
34
+ {% elif item != '__init__' %}
35
+ {%- set _ = other_methods.append(item) %}
36
+ {%- endif %}
37
+ {% endfor %}
38
+
39
+ {% for item in other_methods %}
29
40
  ~{{ fullname }}.{{ item }}
30
- {%- endif -%}
31
- {%- endfor %}
41
+ {% endfor %}
42
+
43
+ {% for item in plotting_methods %}
44
+ ~{{ fullname }}.{{ item }}
45
+ {% endfor %}
32
46
  {% endif %}
33
47
  {% endblock %}
34
48
 
@@ -2,21 +2,25 @@
2
2
  # mypy: ignore-errors
3
3
 
4
4
  import sys
5
+ from datetime import datetime
6
+ from importlib.metadata import metadata
5
7
  from pathlib import Path
6
8
 
7
9
  HERE = Path(__file__).parent
8
10
  sys.path[:0] = [str(HERE.parent), str(HERE / "extensions")]
9
11
 
10
- needs_sphinx = "4.3" # Nicer param docs
12
+ needs_sphinx = "4.3"
11
13
 
12
- # General information about the project.
13
- project = "pertpy"
14
- copyright = "2021, Lukas Heumos, Theislab"
15
- author = "Lukas Heumos"
14
+ info = metadata("pertpy")
15
+ project_name = info["Name"]
16
+ author = info["Author"]
17
+ copyright = f"{datetime.now():%Y}, {author}."
18
+ version = info["Version"]
19
+ urls = dict(pu.split(", ") for pu in info.get_all("Project-URL"))
20
+ repository_url = urls["Source"]
21
+ release = info["Version"]
16
22
  github_repo = "pertpy"
17
23
 
18
- version = "0.6.0"
19
- release = "0.6.0"
20
24
 
21
25
  extensions = [
22
26
  "myst_parser",
@@ -98,7 +102,8 @@ intersphinx_mapping = {
98
102
 
99
103
  language = "en"
100
104
 
101
- # The name of the Pygments (syntax highlighting) style to use.
105
+ typehints_defaults = "comma"
106
+
102
107
  pygments_style = "default"
103
108
  pygments_dark_style = "native"
104
109
 
@@ -167,7 +172,7 @@ nbsphinx_prolog = r"""
167
172
  <p class="admonition-title">Note</p>
168
173
  <p>
169
174
  This page was generated from
170
- <a class="reference external" href="https://github.com/theislab/pertpy/tree/{version}/">{docname}</a>.
175
+ <a class="reference external" href="https://github.com/scverse/pertpy/tree/{version}/">{docname}</a>.
171
176
  Some tutorial content may look better in light mode.
172
177
  </p>
173
178
  </div>
@@ -181,9 +186,13 @@ nbsphinx_thumbnails = {
181
186
  "tutorials/notebooks/tasccoda": "_static/tutorials/tasccoda.png",
182
187
  "tutorials/notebooks/milo": "_static/tutorials/milo.png",
183
188
  "tutorials/notebooks/dialogue": "_static/tutorials/dialogue.png",
189
+ "tutorials/notebooks/enrichment": "_static/tutorials/enrichment.png",
184
190
  "tutorials/notebooks/distances": "_static/tutorials/distances.png",
185
191
  "tutorials/notebooks/distance_tests": "_static/tutorials/distances_tests.png",
192
+ "tutorials/notebooks/cinemaot": "_static/tutorials/cinemaot.png",
186
193
  "tutorials/notebooks/scgen_perturbation_prediction": "_static/tutorials/scgen_perturbation_prediction.png",
187
- "tutorials/notebooks/scgen_batch_removal": "_static/tutorials/scgen_batch_removal.png",
194
+ "tutorials/notebooks/perturbation_space": "_static/tutorials/perturbation_space.png",
195
+ "tutorials/notebooks/differential_gene_expression": "_static/tutorials/dge.png",
196
+ "tutorials/notebooks/metadata_annotation": "_static/tutorials/metadata.png",
188
197
  "tutorials/notebooks/ontology_mapping": "_static/tutorials/ontology.png",
189
198
  }
@@ -13,7 +13,7 @@ In addition to the packages needed to _use_ this package, you need additional py
13
13
  the documentation_. It's easy to install them using `pip`:
14
14
 
15
15
  ```bash
16
- git clone https://github.com/theislab/pertpy.git
16
+ git clone https://github.com/scverse/pertpy.git
17
17
  cd pertpy
18
18
  pip install -e ".[dev,test,doc]"
19
19
  ```
@@ -146,7 +146,7 @@ on how to write documentation.
146
146
  The documentation is set-up to render jupyter notebooks stored in the `docs/tutorials` directory using [myst-nb][].
147
147
  Currently, only notebooks in `.ipynb` format are supported that will be included with both their input and output cells.
148
148
 
149
- These notebooks come from [pert-tutorials](https://github.com/theislab/pertpy-tutorials) which is a git submodule of pertpy.
149
+ These notebooks come from [pert-tutorials](https://github.com/scverse/pertpy-tutorials) which is a git submodule of pertpy.
150
150
 
151
151
  #### Hints
152
152
 
@@ -24,15 +24,6 @@
24
24
  The tutorials walk you through real-world applications of pertpy.
25
25
  ```
26
26
 
27
- ```{eval-rst}
28
- .. card:: Use cases :octicon:`info;1em;`
29
- :link: user_guide/index
30
- :link-type: doc
31
-
32
- pertpy has been applied to many use-cases. We highlight some of them here.
33
- Interested in adding your use-case? Please talk to us.
34
- ```
35
-
36
27
  ```{eval-rst}
37
28
  .. card:: Discussion :octicon:`megaphone;1em;`
38
29
  :link: https://discourse.scverse.org/
@@ -43,7 +34,7 @@
43
34
 
44
35
  ```{eval-rst}
45
36
  .. card:: GitHub :octicon:`mark-github;1em;`
46
- :link: https://github.com/theislab/pertpy
37
+ :link: https://github.com/scverse/pertpy
47
38
 
48
39
  Find a bug? Interested in improving pertpy? Checkout our GitHub for the latest developments.
49
40
 
@@ -59,8 +50,7 @@ usage/usage
59
50
  tutorials/index
60
51
  contributing
61
52
  code_of_conduct
62
- Discussions <https://github.com/theislab/pertpy/discussions>
63
- authors
53
+ Discussions <https://github.com/scverse/pertpy/discussions>
64
54
  references
65
55
  ```
66
56