DOTools-py 0.0.4__tar.gz → 0.1__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.
- {dotools_py-0.0.4 → dotools_py-0.1}/CHANGELOG.md +31 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/PKG-INFO +23 -22
- {dotools_py-0.0.4 → dotools_py-0.1}/README.md +16 -19
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/api/dt.md +1 -0
- dotools_py-0.1/docs/api/generated/MarkersCellsHeart.png +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/api/get.md +1 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/api/pl.md +2 -1
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/api/pp.md +12 -3
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/api/tl.md +10 -4
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/api/utility.md +3 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/conf.py +4 -2
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/installation.md +17 -20
- {dotools_py-0.0.4 → dotools_py-0.1}/pyproject.toml +7 -3
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/_custom_class.py +4 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/bm/_helper.py +2 -4
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/bm/_integration_metrics.py +1 -4
- dotools_py-0.1/src/dotools_py/dt/TableGO_Example.parquet +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/dt/__init__.py +1 -1
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/dt/_datasets.py +44 -7
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/dt/_markers.py +21 -1
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/get/__init__.py +2 -1
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/get/_generic.py +306 -132
- dotools_py-0.1/src/dotools_py/get/_get_classes.py +300 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/io/_dataframes.py +5 -1
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/io/_objects.py +10 -7
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/io/_rds.py +32 -109
- dotools_py-0.1/src/dotools_py/pl/_Classes.py +2272 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/pl/_StatsPlotter.py +73 -18
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/pl/__init__.py +1 -1
- dotools_py-0.1/src/dotools_py/pl/_dotplot.py +233 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/pl/_downstream.py +259 -34
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/pl/_embeddings.py +17 -13
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/pl/_experimental.py +9 -9
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/pl/_expression.py +34 -25
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/pl/_heatmap.py +162 -398
- dotools_py-0.1/src/dotools_py/pl/_plot_utils.py +591 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/pl/_visium.py +8 -9
- dotools_py-0.1/src/dotools_py/pp/__init__.py +9 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/pp/_cellbender.py +136 -3
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/pp/_importer.py +277 -44
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/pp/_utils.py +19 -19
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/settings/_configure.py +26 -12
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/settings/_global_parameters.py +1 -1
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/tl/_CCA/cca.py +1 -1
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/tl/_Statistical.py +6 -7
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/tl/_analysis.py +39 -24
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/tl/_get_stats.py +18 -20
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/tl/_rankGenes.py +20 -19
- dotools_py-0.1/src/dotools_py/util_scripts/_ReadWrite_RDS_anndataR.R +177 -0
- dotools_py-0.1/src/dotools_py/utility/__init__.py +5 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/utility/_general.py +213 -6
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/utility/_plotting.py +55 -3
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/utility/_spatial.py +3 -3
- {dotools_py-0.0.4 → dotools_py-0.1}/tests/data/test_datasets.py +7 -2
- {dotools_py-0.0.4 → dotools_py-0.1}/tests/data/test_markers.py +3 -2
- {dotools_py-0.0.4 → dotools_py-0.1}/tests/get/test_generic.py +42 -15
- {dotools_py-0.0.4 → dotools_py-0.1}/tests/io/test_IO.py +26 -18
- {dotools_py-0.0.4 → dotools_py-0.1}/tests/plotting/test_plotting.py +30 -30
- {dotools_py-0.0.4 → dotools_py-0.1}/tests/pp/test_importer.py +10 -4
- {dotools_py-0.0.4 → dotools_py-0.1}/tests/tools/test_analysis.py +40 -13
- {dotools_py-0.0.4 → dotools_py-0.1}/tests/tools/test_statistic.py +15 -4
- {dotools_py-0.0.4 → dotools_py-0.1}/tests/utility/test_anndata.py +2 -2
- {dotools_py-0.0.4 → dotools_py-0.1}/tests/utility/test_general.py +50 -8
- {dotools_py-0.0.4 → dotools_py-0.1}/tests/utility/test_logger.py +1 -1
- {dotools_py-0.0.4 → dotools_py-0.1}/tests/utility/test_plotting.py +16 -1
- dotools_py-0.0.4/docs/api/generated/MarkersCellsHeart.png +0 -0
- dotools_py-0.0.4/src/dotools_py/pl/_Classes.py +0 -736
- dotools_py-0.0.4/src/dotools_py/pl/_dotplot.py +0 -2059
- dotools_py-0.0.4/src/dotools_py/pl/_plot_utils.py +0 -281
- dotools_py-0.0.4/src/dotools_py/pp/__init__.py +0 -2
- dotools_py-0.0.4/src/dotools_py/utility/__init__.py +0 -3
- {dotools_py-0.0.4 → dotools_py-0.1}/.codecov.yaml +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/.cruft.json +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/.editorconfig +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/.github/workflows/build.yaml +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/.github/workflows/release.yaml +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/.github/workflows/test.yaml +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/.gitignore +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/.pre-commit-config.yaml +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/.readthedocs.yaml +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/.vscode/extensions.json +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/.vscode/launch.json +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/.vscode/settings.json +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/LICENSE +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/biome.jsonc +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/_static/.gitkeep +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/_static/css/custom.css +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/_static/figures/DoTools_Overview.png +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/_static/figures/LogoDoTools.png +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/_templates/.gitkeep +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/_templates/autosummary/class.rst +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/api/bm.md +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/api/index.md +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/api/io.md +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/api/settings.md +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/changelog.md +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/cite.md +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/extensions/typed_returns.py +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/figures/LogoDoTools.png +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/figures/split_bar_gsea_example.png +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/index.md +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/notebooks/Example_Visium.ipynb +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/notebooks/Integration.ipynb +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/notebooks/Running_CellBender.ipynb +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/notebooks/dea.ipynb +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/notebooks/example_10X.ipynb +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/notebooks/example_visualisation.ipynb +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/notebooks/index.md +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/references.bib +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/docs/references.md +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/__init__.py +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/_experimental/__init__.py +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/_experimental/_deprecated/__init__.py +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/_experimental/_deprecated/_convertion.py +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/_experimental/_deprecated/_expression.py +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/_experimental/_deprecated/_importer.py +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/_experimental/_deprecated/_language.py +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/_experimental/_deprecated/_old_code.py +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/_experimental/_deprecated/_statistics.py +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/_experimental/gr/__init__.py +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/_experimental/gr/_generic.py +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/_utils.py +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/bm/__init__.py +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/dt/example_reduced.h5ad +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/dt/example_visium_reduced.h5ad +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/io/__init__.py +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/io/_utils.py +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/logger.py +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/pl/_Plotter.py +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/settings/__init__.py +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/tl/_CCA/_Original.py +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/tl/__init__.py +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/util_scripts/_ReadWrite_RDS.R +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/util_scripts/_run_CCA.R +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/util_scripts/_run_CellBender.sh +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/util_scripts/_run_MAST.R +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/util_scripts/_run_SCTransform.R +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/util_scripts/_run_edgeR.R +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/util_scripts/_run_scDblFinder.R +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/utility/HomoSapiens_GeneMetadata.pickle.gz +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/src/dotools_py/utility/MusMusculus_GeneMetadata.pickle.gz +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/tests/bm/test_bm.py +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/tests/conftest.py +0 -0
- {dotools_py-0.0.4 → dotools_py-0.1}/tests/pp/test_complementary.py +0 -0
|
@@ -8,6 +8,37 @@ and this project adheres to [Semantic Versioning][].
|
|
|
8
8
|
[keep a changelog]: https://keepachangelog.com/en/1.0.0/
|
|
9
9
|
[semantic versioning]: https://semver.org/spec/v2.0.0.html
|
|
10
10
|
|
|
11
|
+
|
|
12
|
+
## Version 0.1 {small}`2026-12-03`
|
|
13
|
+
|
|
14
|
+
### Changes
|
|
15
|
+
- For the majority of the functions the arguments are now keyword-only except `adata`.
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
- Add ``dotools_py.pl.ora_network`` to visualize overrepresentation results as a network
|
|
19
|
+
- Add ``dotools_py.get.metacells`` to generate metacells
|
|
20
|
+
- Add ``dotools_py.pp.filter_cells`` and ``dotools_py.pp.filter_genes``
|
|
21
|
+
- Add ``dotools_py.pp.run_ambidose`` for ambient RNA removal
|
|
22
|
+
- Add ``do.dt.example_ora`` for tutorial examples
|
|
23
|
+
- Improvement of ``do.pl.heatmap`` to groupby two categories like in ``do.pl.dotplot``
|
|
24
|
+
- Include option to filter-out features not present in the object for ``do.dt.heart_markers``
|
|
25
|
+
- Replace ``zellkonverter`` with ``anndataR`` to improve reading and saving to Seurat/SingleCellExperiment
|
|
26
|
+
- Add ``dotools_py.utility.set_path`` to create and return a normalize path
|
|
27
|
+
- Add ``dotools_py.utility.to_toml`` to save information of the current environment to TOML file for sharing
|
|
28
|
+
- Add utility functions for plotting
|
|
29
|
+
- Improvement of the performance of ``do.get.mean_expr`` and ``do.get.expr``
|
|
30
|
+
- Improvement of performance of ``do.get.pseudobulk`` and allow to use different backends (`scanpy`, `decoupler`, `dotools`)
|
|
31
|
+
- ``dotools_py.pl.cell_composition`` shows the number of cells per condition at the top of the bar
|
|
32
|
+
|
|
33
|
+
### Bug Fixes
|
|
34
|
+
- Bug fixes for several functions
|
|
35
|
+
- Fix error when saving results in ``do.tl.rank_genes_condition``
|
|
36
|
+
- Improve consistency for the matrix plots (``dotools_py.pl.dotplot`` and ``dotools_py.pl.heatmap``). Both use the same underlying code.
|
|
37
|
+
|
|
38
|
+
### Documentation
|
|
39
|
+
- Update figure with markers in ``do.dt.heart_markers``
|
|
40
|
+
|
|
41
|
+
|
|
11
42
|
## Version 0.0.4 {small}`2026-06-10`
|
|
12
43
|
|
|
13
44
|
### News
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: DOTools_py
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.1
|
|
4
4
|
Summary: Convenient functions to streamline sc/snRNAseq data analysis workflow
|
|
5
5
|
Project-URL: Documentation, https://DOTools_py.readthedocs.io/
|
|
6
6
|
Project-URL: Homepage, https://github.com/davidrm-bio/DOTools_py
|
|
@@ -47,10 +47,12 @@ Requires-Dist: gseapy<1.1.11
|
|
|
47
47
|
Requires-Dist: harmony-pytorch
|
|
48
48
|
Requires-Dist: harmonypy
|
|
49
49
|
Requires-Dist: jupyter
|
|
50
|
+
Requires-Dist: networkx
|
|
50
51
|
Requires-Dist: numba
|
|
51
52
|
Requires-Dist: numpy>=1.26.4
|
|
52
53
|
Requires-Dist: pandas>=2.2.3
|
|
53
54
|
Requires-Dist: polars>=1.30
|
|
55
|
+
Requires-Dist: prelude-py
|
|
54
56
|
Requires-Dist: pydeseq2
|
|
55
57
|
Requires-Dist: requests
|
|
56
58
|
Requires-Dist: rich<14
|
|
@@ -62,6 +64,7 @@ Requires-Dist: scikit-image
|
|
|
62
64
|
Requires-Dist: scipy
|
|
63
65
|
Requires-Dist: scvi-tools>=1.3
|
|
64
66
|
Requires-Dist: session-info2
|
|
67
|
+
Requires-Dist: tomlkit
|
|
65
68
|
Requires-Dist: tqdm
|
|
66
69
|
Provides-Extra: dev
|
|
67
70
|
Requires-Dist: pre-commit; extra == 'dev'
|
|
@@ -103,6 +106,7 @@ Requires-Dist: appdirs; extra == 'test'
|
|
|
103
106
|
Requires-Dist: bbknn; extra == 'test'
|
|
104
107
|
Requires-Dist: celltypist; extra == 'test'
|
|
105
108
|
Requires-Dist: coverage; extra == 'test'
|
|
109
|
+
Requires-Dist: decoupler; extra == 'test'
|
|
106
110
|
Requires-Dist: doubletdetection; extra == 'test'
|
|
107
111
|
Requires-Dist: fastexcel; extra == 'test'
|
|
108
112
|
Requires-Dist: gseapy; extra == 'test'
|
|
@@ -120,7 +124,7 @@ Requires-Dist: scipy; extra == 'test'
|
|
|
120
124
|
Requires-Dist: scvi-tools; extra == 'test'
|
|
121
125
|
Requires-Dist: seaborn; extra == 'test'
|
|
122
126
|
Requires-Dist: tqdm; extra == 'test'
|
|
123
|
-
Requires-Dist: zarr; extra == 'test'
|
|
127
|
+
Requires-Dist: zarr<3; extra == 'test'
|
|
124
128
|
Description-Content-Type: text/markdown
|
|
125
129
|
|
|
126
130
|
# DOTools_py
|
|
@@ -135,7 +139,7 @@ Description-Content-Type: text/markdown
|
|
|
135
139
|
[](https://pepy.tech/projects/dotools-py)
|
|
136
140
|
|
|
137
141
|
[badge-tests]: https://img.shields.io/github/actions/workflow/status/davidrm-bio/DOTools_py/test.yaml?branch=main
|
|
138
|
-
[badge-docs]: https://img.shields.io/readthedocs/DOTools_py/
|
|
142
|
+
[badge-docs]: https://img.shields.io/readthedocs/DOTools_py/latest
|
|
139
143
|
[badge-issues]: https://img.shields.io/github/issues/davidrm-bio/DOTools_py
|
|
140
144
|
[badge-stars]: https://img.shields.io/github/stars/davidrm-bio/DOTools_py?style=flat&logo=github&color=yellow
|
|
141
145
|
[badge-coverage]: https://codecov.io/gh/davidrm-bio/DOTools_py/branch/main/graph/badge.svg
|
|
@@ -189,24 +193,22 @@ Some methods are run through R and require additional dependencies
|
|
|
189
193
|
including: `Seurat`, `MAST`, `scDblFinder`, `zellkonverter`, `data.table` and `optparse`.
|
|
190
194
|
|
|
191
195
|
```R
|
|
192
|
-
if (!
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
BiocManager::install("zellkonverter")
|
|
202
|
-
BiocManager::install('glmGamPoi')
|
|
196
|
+
if (!requireNamespace("pak", quietly = TRUE)) {
|
|
197
|
+
install.packages("pak")
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
pak::pkg_install(c(
|
|
201
|
+
"optparse", "remotes", "data.table", "bioc::MAST", "bioc::scDblFinder",
|
|
202
|
+
"bioc::anndataR", "bioc::glmGamPoi", "github::satijalab/seurat@seurat5"
|
|
203
|
+
))
|
|
204
|
+
|
|
203
205
|
```
|
|
204
206
|
|
|
205
207
|
For old CPU architectures there can be problems with [polars](https://docs.pola.rs/) making the kernel die
|
|
206
208
|
when importing the package. In this case run
|
|
207
209
|
|
|
208
210
|
```bash
|
|
209
|
-
pip install --no-cache polars-lts-cpu
|
|
211
|
+
uv pip install --no-cache polars-lts-cpu
|
|
210
212
|
```
|
|
211
213
|
|
|
212
214
|
## R version
|
|
@@ -215,17 +217,16 @@ We also have an R implementation of the [DOTools](https://github.com/MarianoRuz
|
|
|
215
217
|
installed from Bioconductor:
|
|
216
218
|
|
|
217
219
|
```R
|
|
218
|
-
if (!requireNamespace("
|
|
219
|
-
install.packages("
|
|
220
|
+
if (!requireNamespace("pak", quietly=TRUE)) {
|
|
221
|
+
install.packages("pak")
|
|
220
222
|
}
|
|
221
|
-
|
|
222
|
-
devtools::install_github("MarianoRuzJurado/DOtools")
|
|
223
|
+
pak::pkg_install("bioc::DOtools")
|
|
223
224
|
```
|
|
224
225
|
|
|
225
|
-
The developmental version can be downloaded using `
|
|
226
|
+
The developmental version can be downloaded using `pak`:
|
|
226
227
|
|
|
227
228
|
```R
|
|
228
|
-
|
|
229
|
+
pak::pkg_install("github::MarianoRuzJurado/DOtools@devel")
|
|
229
230
|
```
|
|
230
231
|
|
|
231
232
|
## Release notes
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
[](https://pepy.tech/projects/dotools-py)
|
|
11
11
|
|
|
12
12
|
[badge-tests]: https://img.shields.io/github/actions/workflow/status/davidrm-bio/DOTools_py/test.yaml?branch=main
|
|
13
|
-
[badge-docs]: https://img.shields.io/readthedocs/DOTools_py/
|
|
13
|
+
[badge-docs]: https://img.shields.io/readthedocs/DOTools_py/latest
|
|
14
14
|
[badge-issues]: https://img.shields.io/github/issues/davidrm-bio/DOTools_py
|
|
15
15
|
[badge-stars]: https://img.shields.io/github/stars/davidrm-bio/DOTools_py?style=flat&logo=github&color=yellow
|
|
16
16
|
[badge-coverage]: https://codecov.io/gh/davidrm-bio/DOTools_py/branch/main/graph/badge.svg
|
|
@@ -64,24 +64,22 @@ Some methods are run through R and require additional dependencies
|
|
|
64
64
|
including: `Seurat`, `MAST`, `scDblFinder`, `zellkonverter`, `data.table` and `optparse`.
|
|
65
65
|
|
|
66
66
|
```R
|
|
67
|
-
if (!
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
BiocManager::install("zellkonverter")
|
|
77
|
-
BiocManager::install('glmGamPoi')
|
|
67
|
+
if (!requireNamespace("pak", quietly = TRUE)) {
|
|
68
|
+
install.packages("pak")
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
pak::pkg_install(c(
|
|
72
|
+
"optparse", "remotes", "data.table", "bioc::MAST", "bioc::scDblFinder",
|
|
73
|
+
"bioc::anndataR", "bioc::glmGamPoi", "github::satijalab/seurat@seurat5"
|
|
74
|
+
))
|
|
75
|
+
|
|
78
76
|
```
|
|
79
77
|
|
|
80
78
|
For old CPU architectures there can be problems with [polars](https://docs.pola.rs/) making the kernel die
|
|
81
79
|
when importing the package. In this case run
|
|
82
80
|
|
|
83
81
|
```bash
|
|
84
|
-
pip install --no-cache polars-lts-cpu
|
|
82
|
+
uv pip install --no-cache polars-lts-cpu
|
|
85
83
|
```
|
|
86
84
|
|
|
87
85
|
## R version
|
|
@@ -90,17 +88,16 @@ We also have an R implementation of the [DOTools](https://github.com/MarianoRuz
|
|
|
90
88
|
installed from Bioconductor:
|
|
91
89
|
|
|
92
90
|
```R
|
|
93
|
-
if (!requireNamespace("
|
|
94
|
-
install.packages("
|
|
91
|
+
if (!requireNamespace("pak", quietly=TRUE)) {
|
|
92
|
+
install.packages("pak")
|
|
95
93
|
}
|
|
96
|
-
|
|
97
|
-
devtools::install_github("MarianoRuzJurado/DOtools")
|
|
94
|
+
pak::pkg_install("bioc::DOtools")
|
|
98
95
|
```
|
|
99
96
|
|
|
100
|
-
The developmental version can be downloaded using `
|
|
97
|
+
The developmental version can be downloaded using `pak`:
|
|
101
98
|
|
|
102
99
|
```R
|
|
103
|
-
|
|
100
|
+
pak::pkg_install("github::MarianoRuzJurado/DOtools@devel")
|
|
104
101
|
```
|
|
105
102
|
|
|
106
103
|
## Release notes
|
|
Binary file
|
|
@@ -40,13 +40,14 @@ functions for enhance visualization of sc/snRNA-seq data.
|
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
## Statistical plots
|
|
43
|
+
## Downstream and Statistical plots
|
|
44
44
|
```{eval-rst}
|
|
45
45
|
.. autosummary::
|
|
46
46
|
:toctree: generated
|
|
47
47
|
|
|
48
48
|
pl.cell_composition
|
|
49
49
|
pl.split_bar_gsea
|
|
50
|
+
pl.ora_network
|
|
50
51
|
pl.correlation
|
|
51
52
|
pl.volcano_plot
|
|
52
53
|
```
|
|
@@ -4,8 +4,7 @@ The preprocessing module {mod}`dotools_py.pp` compiles all the basic quality con
|
|
|
4
4
|
analyzing sc/snRNA-seq and Visium with different implementations building on packages from the
|
|
5
5
|
[scverse ecosystem](https://scverse.org/)
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
## Processing
|
|
7
|
+
## Ambient RNA removal
|
|
9
8
|
```{eval-rst}
|
|
10
9
|
.. module:: dotools_py.pp
|
|
11
10
|
.. currentmodule:: dotools_py
|
|
@@ -14,10 +13,20 @@ analyzing sc/snRNA-seq and Visium with different implementations building on pac
|
|
|
14
13
|
:toctree: generated
|
|
15
14
|
|
|
16
15
|
pp.run_cellbender
|
|
16
|
+
pp.run_ambidose
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Processing
|
|
20
|
+
```{eval-rst}
|
|
21
|
+
.. autosummary::
|
|
22
|
+
:toctree: generated
|
|
23
|
+
|
|
17
24
|
pp.importer_py
|
|
18
25
|
pp.quality_control
|
|
19
26
|
pp.log_normalize
|
|
20
27
|
pp.pearson_residuals_normalize
|
|
21
28
|
pp.find_doublets
|
|
22
|
-
|
|
29
|
+
pp.filter_cells
|
|
30
|
+
pp.filter_genes
|
|
23
31
|
```
|
|
32
|
+
|
|
@@ -4,7 +4,7 @@ The tools module {mod}`dotools_py.tl` contains functions for the downstream
|
|
|
4
4
|
analysis and statistical methods.
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Integration
|
|
8
8
|
```{eval-rst}
|
|
9
9
|
.. module:: dotools_py.tl
|
|
10
10
|
.. currentmodule:: dotools_py
|
|
@@ -17,14 +17,19 @@ analysis and statistical methods.
|
|
|
17
17
|
tl.run_scanvi
|
|
18
18
|
tl.run_harmony
|
|
19
19
|
tl.run_seurat_integration
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Clustering and Cell Annotation
|
|
23
|
+
```{eval-rst}
|
|
24
|
+
.. autosummary::
|
|
25
|
+
:toctree: generated
|
|
26
|
+
|
|
27
|
+
tl.umap_clustering
|
|
20
28
|
tl.auto_annot
|
|
21
29
|
tl.reclustering
|
|
22
30
|
tl.full_recluster
|
|
23
|
-
tl.umap_clustering
|
|
24
|
-
tl.go_analysis
|
|
25
31
|
```
|
|
26
32
|
|
|
27
|
-
|
|
28
33
|
## Statistical Analysis
|
|
29
34
|
```{eval-rst}
|
|
30
35
|
.. autosummary::
|
|
@@ -37,6 +42,7 @@ analysis and statistical methods.
|
|
|
37
42
|
tl.rank_genes_consensus
|
|
38
43
|
tl.grouped_ttest
|
|
39
44
|
tl.run_mast
|
|
45
|
+
tl.go_analysis
|
|
40
46
|
```
|
|
41
47
|
|
|
42
48
|
|
|
@@ -13,9 +13,11 @@ the analysis.
|
|
|
13
13
|
|
|
14
14
|
utility.free_memory
|
|
15
15
|
utility.create_report
|
|
16
|
+
utility.to_toml
|
|
16
17
|
utility.transfer_labels
|
|
17
18
|
utility.add_gene_metadata
|
|
18
19
|
utility.live_display
|
|
20
|
+
utility.set_path
|
|
19
21
|
```
|
|
20
22
|
|
|
21
23
|
|
|
@@ -28,6 +30,7 @@ the analysis.
|
|
|
28
30
|
utility.extended_tab20
|
|
29
31
|
utility.get_hex_colormaps
|
|
30
32
|
utility.spine_format
|
|
33
|
+
utility.add_spines
|
|
31
34
|
utility.tab30
|
|
32
35
|
```
|
|
33
36
|
|
|
@@ -26,6 +26,7 @@ matplotlib.use("agg")
|
|
|
26
26
|
|
|
27
27
|
# NOTE: If you installed your project in editable mode, this might be stale.
|
|
28
28
|
# If this is the case, reinstall it to refresh the metadata
|
|
29
|
+
|
|
29
30
|
info = metadata("DOTools_py")
|
|
30
31
|
project_name = info["Name"]
|
|
31
32
|
author = info["Author"]
|
|
@@ -34,7 +35,7 @@ version = info["Version"]
|
|
|
34
35
|
urls = dict(pu.split(", ") for pu in info.get_all("Project-URL"))
|
|
35
36
|
repository_url = urls["Source"]
|
|
36
37
|
|
|
37
|
-
github_repo = "pertpy"
|
|
38
|
+
# github_repo = "pertpy"
|
|
38
39
|
|
|
39
40
|
# The full version, including alpha/beta/rc tags
|
|
40
41
|
release = info["Version"]
|
|
@@ -42,6 +43,7 @@ release = info["Version"]
|
|
|
42
43
|
bibtex_bibfiles = ["references.bib"]
|
|
43
44
|
templates_path = ["_templates"]
|
|
44
45
|
nitpicky = True # Warn about broken links
|
|
46
|
+
|
|
45
47
|
needs_sphinx = "4.0"
|
|
46
48
|
|
|
47
49
|
html_context = {
|
|
@@ -108,7 +110,7 @@ source_suffix = {
|
|
|
108
110
|
|
|
109
111
|
intersphinx_mapping = {
|
|
110
112
|
"python": ("https://docs.python.org/3", None),
|
|
111
|
-
"anndata": ("https://anndata.
|
|
113
|
+
"anndata": ("https://anndata.scverse.org/en/stable/", None),
|
|
112
114
|
"scanpy": ("https://scanpy.readthedocs.io/en/stable/", None),
|
|
113
115
|
"numpy": ("https://numpy.org/doc/stable/", None),
|
|
114
116
|
"matplotlib": ("https://matplotlib.org/stable/", None),
|
|
@@ -21,7 +21,7 @@ uv pip install dotools-py
|
|
|
21
21
|
uv pip install git+https://github.com/davidrm-bio/DOTools_py.git@main
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
Finally, to use this environment in
|
|
24
|
+
Finally, to use this environment in Jupyter notebook, add jupyter kernel for this environment:
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
27
|
python -m ipykernel install --user --name=scrna_py11 --display-name=scrna_py11
|
|
@@ -33,27 +33,25 @@ This package has been tested on macOS, Linux and Windows System. For a standard
|
|
|
33
33
|
we suggest 16GB of RAM and at least 5 CPUs.
|
|
34
34
|
|
|
35
35
|
Some methods are run through R and require additional dependencies
|
|
36
|
-
including: `Seurat`, `MAST`, `scDblFinder`, `
|
|
36
|
+
including: `Seurat`, `MAST`, `scDblFinder`, `anndataR`, `data.table` and `optparse`.
|
|
37
37
|
|
|
38
38
|
```R
|
|
39
|
-
if (!
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
BiocManager::install("zellkonverter")
|
|
49
|
-
BiocManager::install('glmGamPoi')
|
|
39
|
+
if (!requireNamespace("pak", quietly = TRUE)) {
|
|
40
|
+
install.packages("pak")
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
pak::pkg_install(c(
|
|
44
|
+
"optparse", "remotes", "data.table", "bioc::MAST", "bioc::scDblFinder",
|
|
45
|
+
"bioc::anndataR", "bioc::glmGamPoi", "github::satijalab/seurat@seurat5"
|
|
46
|
+
))
|
|
47
|
+
|
|
50
48
|
```
|
|
51
49
|
|
|
52
50
|
For old CPU architectures there can be problems with [polars](https://docs.pola.rs/) making the kernel die
|
|
53
51
|
when importing the package. In this case run
|
|
54
52
|
|
|
55
53
|
```bash
|
|
56
|
-
pip install --no-cache polars-lts-cpu
|
|
54
|
+
uv pip install --no-cache polars-lts-cpu
|
|
57
55
|
```
|
|
58
56
|
|
|
59
57
|
# R version
|
|
@@ -62,15 +60,14 @@ We also have an R implementation of the [DOTools](https://github.com/MarianoRuz
|
|
|
62
60
|
installed from Bioconductor:
|
|
63
61
|
|
|
64
62
|
```R
|
|
65
|
-
if (!requireNamespace("
|
|
66
|
-
install.packages("
|
|
63
|
+
if (!requireNamespace("pak", quietly=TRUE)) {
|
|
64
|
+
install.packages("pak")
|
|
67
65
|
}
|
|
68
|
-
|
|
69
|
-
devtools::install_github("MarianoRuzJurado/DOtools")
|
|
66
|
+
pak::pkg_install("bioc::DOtools")
|
|
70
67
|
```
|
|
71
68
|
|
|
72
|
-
The developmental version can be downloaded using `
|
|
69
|
+
The developmental version can be downloaded using `pak`:
|
|
73
70
|
|
|
74
71
|
```R
|
|
75
|
-
|
|
72
|
+
pak::pkg_install("github::MarianoRuzJurado/DOtools@devel")
|
|
76
73
|
```
|
|
@@ -4,7 +4,7 @@ requires = ["hatchling"]
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "DOTools_py"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.1"
|
|
8
8
|
description = "Convenient functions to streamline sc/snRNAseq data analysis workflow"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { file = "LICENSE" }
|
|
@@ -63,6 +63,9 @@ dependencies = [
|
|
|
63
63
|
"harmony-pytorch",
|
|
64
64
|
"appdirs",
|
|
65
65
|
"rich<14",
|
|
66
|
+
"networkx",
|
|
67
|
+
"prelude_py",
|
|
68
|
+
"tomlkit"
|
|
66
69
|
]
|
|
67
70
|
|
|
68
71
|
|
|
@@ -124,9 +127,10 @@ optional-dependencies.test = [
|
|
|
124
127
|
"tqdm",
|
|
125
128
|
"pyarrow",
|
|
126
129
|
"fastexcel",
|
|
127
|
-
"zarr",
|
|
130
|
+
"zarr<3",
|
|
128
131
|
"appdirs",
|
|
129
|
-
"rich<14"
|
|
132
|
+
"rich<14",
|
|
133
|
+
"decoupler"
|
|
130
134
|
]
|
|
131
135
|
# https://docs.pypi.org/project_metadata/#project-urls
|
|
132
136
|
urls.Documentation = "https://DOTools_py.readthedocs.io/"
|
|
@@ -15,6 +15,9 @@ class InputError(Exception):
|
|
|
15
15
|
def __str__(self):
|
|
16
16
|
return f"{self.message}"
|
|
17
17
|
|
|
18
|
+
def __repr__(self) -> str:
|
|
19
|
+
return f"InputError: {self.message}"
|
|
20
|
+
|
|
18
21
|
|
|
19
22
|
class EmptyType:
|
|
20
23
|
"""A singleton sentinel representing an 'empty' value."""
|
|
@@ -23,3 +26,4 @@ class EmptyType:
|
|
|
23
26
|
|
|
24
27
|
|
|
25
28
|
PathLike = str | os.PathLike[str] | pathlib.Path
|
|
29
|
+
ColorLike = str | tuple[float, float, float] | tuple[float, float, float, float]
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
from dotools_py.dt._datasets import example_10x, example_10x_processed, example_visium, example_visium_processed
|
|
1
|
+
from dotools_py.dt._datasets import example_10x, example_10x_processed, example_visium, example_visium_processed, example_ora
|
|
2
2
|
from dotools_py.dt._markers import heart_markers, standard_ct_labels_heart
|
|
@@ -2,7 +2,7 @@ import tqdm
|
|
|
2
2
|
import appdirs
|
|
3
3
|
from typing import Literal
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
from prelude_py import pd, ad
|
|
6
6
|
|
|
7
7
|
from dotools_py import logger
|
|
8
8
|
from dotools_py._custom_class import PathLike, InputError
|
|
@@ -16,7 +16,7 @@ class LoadData:
|
|
|
16
16
|
|
|
17
17
|
def __init__(
|
|
18
18
|
self,
|
|
19
|
-
path: PathLike = None,
|
|
19
|
+
path: PathLike | None = None,
|
|
20
20
|
technology: Literal["scrna", "visium"] = "scrna"
|
|
21
21
|
):
|
|
22
22
|
"""Initiate the class
|
|
@@ -65,7 +65,7 @@ class LoadData:
|
|
|
65
65
|
return self
|
|
66
66
|
|
|
67
67
|
|
|
68
|
-
def _create_dir(self, path: PathLike = None) -> tuple | PathLike:
|
|
68
|
+
def _create_dir(self, path: PathLike | None = None) -> tuple | PathLike:
|
|
69
69
|
"""Create a directory in path to save the data
|
|
70
70
|
|
|
71
71
|
:param path: Absolute path where the data is going to be saved. If set to `None` save in the Cache folder.
|
|
@@ -136,7 +136,7 @@ class LoadData:
|
|
|
136
136
|
return None
|
|
137
137
|
|
|
138
138
|
|
|
139
|
-
def example_10x(path: PathLike = None) -> None:
|
|
139
|
+
def example_10x(*, path: PathLike | None = None) -> None:
|
|
140
140
|
"""Download scRNA 10x dataset.
|
|
141
141
|
|
|
142
142
|
Downloads an example dataset of PBMC from healthy donors and malignant B cells. Two H5 files for each dataset
|
|
@@ -148,7 +148,6 @@ def example_10x(path: PathLike = None) -> None:
|
|
|
148
148
|
|
|
149
149
|
Example
|
|
150
150
|
-------
|
|
151
|
-
|
|
152
151
|
>>> import dotools_py as do
|
|
153
152
|
>>> do.dt.example_10x()
|
|
154
153
|
2026-04-17 14:37:49,503 - Downloading data to /Users/david/Library/Caches/dotools_datasets
|
|
@@ -198,7 +197,7 @@ def example_10x_processed() -> ad.AnnData:
|
|
|
198
197
|
return ad.read_h5ad(HERE / "example_reduced.h5ad")
|
|
199
198
|
|
|
200
199
|
|
|
201
|
-
def example_visium(path: PathLike = None) -> None:
|
|
200
|
+
def example_visium(*, path: PathLike | None = None) -> None:
|
|
202
201
|
""" Download a 10x Visium dataset from the heart.
|
|
203
202
|
|
|
204
203
|
Downloads a dataset of the human heart. The sample comes from fresh frozen tissue and includes the H&E image.
|
|
@@ -206,7 +205,7 @@ def example_visium(path: PathLike = None) -> None:
|
|
|
206
205
|
:param path: Absolute path where the data is saved. If set to `None`, it will be saved to the user cache folder.
|
|
207
206
|
:return: Returns `None`.
|
|
208
207
|
|
|
209
|
-
|
|
208
|
+
Example
|
|
210
209
|
--------
|
|
211
210
|
>>> import dotools_py as do
|
|
212
211
|
>>> do.dt.example_visium()
|
|
@@ -257,3 +256,41 @@ def example_visium_processed()-> ad.AnnData:
|
|
|
257
256
|
|
|
258
257
|
"""
|
|
259
258
|
return ad.read_h5ad(HERE / "example_visium_reduced.h5ad")
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
def example_ora() -> pd.DataFrame:
|
|
262
|
+
"""Load example table from overrepresentation analysis.
|
|
263
|
+
|
|
264
|
+
:return: Returns a pandas DataFrame
|
|
265
|
+
|
|
266
|
+
Notes
|
|
267
|
+
-----
|
|
268
|
+
To generate the table the following code was used:
|
|
269
|
+
|
|
270
|
+
.. code-block:: python
|
|
271
|
+
|
|
272
|
+
import dotools_py as do
|
|
273
|
+
|
|
274
|
+
adata = do.dt.example_10x_processed()
|
|
275
|
+
do.tl.rank_genes_groups(adata, 'condition')
|
|
276
|
+
table = do.get.dge_results(adata)
|
|
277
|
+
table = table[table.group == 'disease']
|
|
278
|
+
table_go = do.tl.go_analysis(table, 'GeneName', 'padj', 'log2fc', specie='Human', go_catgs = ['GO_Molecular_Function_2023', 'GO_Cellular_Component_2023', 'GO_Biological_Process_2023'])
|
|
279
|
+
|
|
280
|
+
Example
|
|
281
|
+
-------
|
|
282
|
+
>>> import dotools_py as do
|
|
283
|
+
>>> df = do.dt.example_ora()
|
|
284
|
+
>>> print(f'Shape: {df.shape}', df.head())
|
|
285
|
+
Shape: (2704, 11)
|
|
286
|
+
Gene_set ... state
|
|
287
|
+
0 GO_Molecular_Function_2023 ... enriched
|
|
288
|
+
1 GO_Molecular_Function_2023 ... enriched
|
|
289
|
+
2 GO_Molecular_Function_2023 ... enriched
|
|
290
|
+
3 GO_Molecular_Function_2023 ... enriched
|
|
291
|
+
4 GO_Molecular_Function_2023 ... enriched
|
|
292
|
+
[5 rows x 11 columns]
|
|
293
|
+
|
|
294
|
+
"""
|
|
295
|
+
|
|
296
|
+
return pd.read_parquet(HERE / "TableGO_Example.parquet")
|