From 898953e4ab680084c51a86bc104a113543334dc7 Mon Sep 17 00:00:00 2001 From: zethson Date: Tue, 27 Feb 2024 12:08:55 +0100 Subject: [PATCH 1/6] simplify dependencies Signed-off-by: zethson --- pyproject.toml | 53 +++++++++++--------------------------------------- 1 file changed, 11 insertions(+), 42 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 409ff4c7..f0b7d509 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,62 +10,47 @@ description = "Panpipes - multimodal single cell pipelines" readme = "README.md" classifiers = [ - # Pick your license as you wish "License :: OSI Approved :: BSD License", - - # Optional - # How mature is this project? Common values are - # 3 - Alpha - # 4 - Beta - # 5 - Production/Stable "Development Status :: 3 - Alpha", - - # Indicate who your project is intended for "Intended Audience :: Science/Research", "Programming Language :: Python :: 3", "Programming Language :: R" ] -requires-python = ">= 3.11" +requires-python = ">= 3.10" dependencies = [ - "anndata>=0.8.0", "apsw", "bbknn", "cgatcore", "drmaa", "gevent", "harmonypy", - "jax", - "jaxlib", "leidenalg", - "louvain", - "matplotlib<=3.7.3", "mofapy2", - "mudata>=0.2.1", "muon", - "numpy>=1.22.4", "openpyxl", - "packaging", - "pandas>=1.0", "paramiko", - "pep8", "pysam", - "pynndescent", - "pytest", "pyyaml", "ruffus", "scanorama", - "scanpy>=1.9.1", + "scanpy>=1.9.1[louvain,leiden]", "scib", - "seaborn<=0.12.2", "scikit-misc", "scirpy", "scrublet", "scvi-tools>=1.1.1", - "sqlalchemy"] + "sqlalchemy" + ] [project.optional-dependencies] +dev = [ + "packaging", + "pytest", + "twine", + "build" +] notebook = [ "jupyter", "jupyterlab" @@ -75,29 +60,13 @@ spatial = [ "cell2location", "tangram-sc" ] -pypi_upload = [ - "twine", - "build" -] - -# The following would provide a command line executable called `sample` -# which executes the function `entry` from this package when invoked. -[project.scripts] # Optional +[project.scripts] panpipes = "panpipes:entry.main" -# This is configuration specific to the `setuptools` build backend. -# If you are using a different build backend, you will need to change this. [tool.setuptools] -# If there are data files included in your packages that need to be -# installed, specify them here. package-data = {"panpipes" = ["panpipes/*/*.yml", "R_scripts/*.R", "resources/*"]} [build-system] -# These are the assumed default build requirements from pip: -# https://pip.pypa.io/en/stable/reference/pip/#pep-517-and-518-support requires = ["setuptools>=43.0.0", "wheel"] build-backend = "setuptools.build_meta" - - -#template for this file from https://github.com/pypa/sampleproject/blob/main/pyproject.toml From dee95fcbd1b118c0c048e40d8fe485f9dd95a87b Mon Sep 17 00:00:00 2001 From: zethson Date: Tue, 27 Feb 2024 13:13:11 +0100 Subject: [PATCH 2/6] Explicit leiden Signed-off-by: zethson --- pyproject.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f0b7d509..45be4bbb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,7 +35,9 @@ dependencies = [ "pyyaml", "ruffus", "scanorama", - "scanpy>=1.9.1[louvain,leiden]", + "scanpy>=1.9.1", + "leidenalg", + "louvain", "scib", "scikit-misc", "scirpy", From 5d48f3a04bc4d3dd26bf384e6304d05bc16732e9 Mon Sep 17 00:00:00 2001 From: zethson Date: Tue, 27 Feb 2024 13:26:24 +0100 Subject: [PATCH 3/6] matplotlib pin Signed-off-by: zethson --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 45be4bbb..0094402e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,8 @@ dependencies = [ "scirpy", "scrublet", "scvi-tools>=1.1.1", - "sqlalchemy" + "sqlalchemy", + "matplotlib<=3.7.3" # pin to be removed in the future ] [project.optional-dependencies] From d00710d293620b28668115c26feefe4b1c16ba51 Mon Sep 17 00:00:00 2001 From: zethson Date: Tue, 27 Feb 2024 13:36:26 +0100 Subject: [PATCH 4/6] matplotlib unpun Signed-off-by: zethson --- panpipes/funcs/plotting.py | 3 ++- pyproject.toml | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/panpipes/funcs/plotting.py b/panpipes/funcs/plotting.py index b5931be3..6e68e588 100644 --- a/panpipes/funcs/plotting.py +++ b/panpipes/funcs/plotting.py @@ -310,8 +310,9 @@ def ridgeplot(adata, features, layer=None, splitplot=3, bandwidth=0.1): ax.yaxis.set_tick_params(labelleft=True) ax.set_yticks(np.arange(len(features_sub))) ax.set_yticklabels(features_sub) + for tick in ax.get_yticklabels(): + tick.set_fontsize(10) for tick in ax.yaxis.get_major_ticks(): - tick.label.set_fontsize(10) tick.label.set_verticalalignment("bottom") fig.tight_layout() diff --git a/pyproject.toml b/pyproject.toml index 0094402e..1951d6af 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,6 @@ dependencies = [ "scrublet", "scvi-tools>=1.1.1", "sqlalchemy", - "matplotlib<=3.7.3" # pin to be removed in the future ] [project.optional-dependencies] From af9d77972a7e75c6407a065b397cf03b096be1cf Mon Sep 17 00:00:00 2001 From: zethson Date: Tue, 27 Feb 2024 13:47:21 +0100 Subject: [PATCH 5/6] Fix label plot Signed-off-by: zethson --- CHANGELOG.md | 2 +- README.md | 4 ++-- panpipes/funcs/plotting.py | 2 +- panpipes/python_scripts/run_preprocess_prot.py | 5 ----- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f57f45ef..dce3d798 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ ### fixed - fixed error in `vis` - - error occurred when only wanting to plot continuous or categorical variables (or neither), not both + - error occurred when only wanting to plot continuous or categorical variables (or neither), not both ### dependencies diff --git a/README.md b/README.md index c6507656..ea6da01b 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ## Overview -Panpipes is a set of computational workflows designed to automate multimodal single-cell and spatial transcriptomic analyses by incorporating widely-used Python-based tools to perform quality control, preprocessing, integration, clustering, and reference mapping at scale. +Panpipes is a set of computational workflows designed to automate multimodal single-cell and spatial transcriptomic analyses by incorporating widely-used Python-based tools to perform quality control, preprocessing, integration, clustering, and reference mapping at scale. Panpipes allows reliable and customisable analysis and evaluation of individual and integrated modalities, thereby empowering decision-making before downstream investigations. **See our [documentation](https://panpipes-pipelines.readthedocs.io/en/latest/) and our [preprint](https://www.biorxiv.org/content/10.1101/2023.03.11.532085v2)** @@ -45,4 +45,4 @@ bioRxiv 2023.03.11.532085; doi: https://doi.org/10.1101/2023.03.11.532085](https ## Contributors Created and Maintained by Charlotte Rich-Griffin and Fabiola Curion. -Additional contributors: Sarah Ouologuem, Devika Agarwal, Lilly May, Kevin Rue-Albrecht. +Additional contributors: Sarah Ouologuem, Devika Agarwal, Lilly May, Kevin Rue-Albrecht, Lukas Heumos. diff --git a/panpipes/funcs/plotting.py b/panpipes/funcs/plotting.py index 6e68e588..184c4004 100644 --- a/panpipes/funcs/plotting.py +++ b/panpipes/funcs/plotting.py @@ -313,7 +313,7 @@ def ridgeplot(adata, features, layer=None, splitplot=3, bandwidth=0.1): for tick in ax.get_yticklabels(): tick.set_fontsize(10) for tick in ax.yaxis.get_major_ticks(): - tick.label.set_verticalalignment("bottom") + tick.label1.set_verticalalignment("bottom") fig.tight_layout() return fig, ax diff --git a/panpipes/python_scripts/run_preprocess_prot.py b/panpipes/python_scripts/run_preprocess_prot.py index 71b3cede..047a2468 100644 --- a/panpipes/python_scripts/run_preprocess_prot.py +++ b/panpipes/python_scripts/run_preprocess_prot.py @@ -67,9 +67,6 @@ args, opt = parser.parse_known_args() -# args = argparse.Namespace(filtered_mudata='test.h5mu', -# bg_mudata='/well/cartography/users/zsj686/non_cart_projects/005-multimodal_scpipelines/ingest/test_raw.h5mu', -# channel_col=None, normalisation_methods='clr,dsb', clr_margin='0', quantile_clipping='True', figpath='./figures/prot', save_mtx=False, save_mudata_path='test.h5mu') save_mtx=pnp.pp.check_for_bool(args.save_mtx) norm_methods = args.normalisation_methods.split(',') @@ -85,9 +82,7 @@ sc.set_figure_params(scanpy=True, fontsize=14, dpi=300, facecolor='white', figsize=(5,5)) - # load filtered data - if use_muon is True this will return a mudata object, else returns an mudata object - L.info("reading filtered mudata object") try: all_mdata = mu.read(args.filtered_mudata) From b733f850d873dc9b39f5a16412b3b93fbbeac65a Mon Sep 17 00:00:00 2001 From: zethson Date: Tue, 27 Feb 2024 16:45:58 +0100 Subject: [PATCH 6/6] Remove 2x leidenalg Signed-off-by: zethson --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1951d6af..747581c8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,6 @@ dependencies = [ "drmaa", "gevent", "harmonypy", - "leidenalg", "mofapy2", "muon", "openpyxl",