From cb6047f785e887b2ee5b96dae7686c99b7f37f4a Mon Sep 17 00:00:00 2001 From: SarahOuologuem Date: Tue, 9 Apr 2024 07:33:17 +0000 Subject: [PATCH 01/10] fix scanpy version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 127430a0..d3147f5a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,7 +36,7 @@ dependencies = [ "pyyaml", "ruffus", "scanorama", - "scanpy>=1.9.1", + "scanpy==1.9.8", "leidenalg", "louvain", "scib", From 720c48b9d844cdb89f8b3e72ed8494f8926d33f6 Mon Sep 17 00:00:00 2001 From: SarahOuologuem Date: Tue, 9 Apr 2024 07:41:24 +0000 Subject: [PATCH 02/10] downgrade scanpy --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d3147f5a..1a294af9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,7 +36,7 @@ dependencies = [ "pyyaml", "ruffus", "scanorama", - "scanpy==1.9.8", + "scanpy==1.9.7", "leidenalg", "louvain", "scib", From 44f66d2e34f863befb80856f2c860f9f334b6238 Mon Sep 17 00:00:00 2001 From: SarahOuologuem Date: Tue, 9 Apr 2024 07:47:16 +0000 Subject: [PATCH 03/10] downgrade scanpy --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1a294af9..94bae092 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,7 +36,7 @@ dependencies = [ "pyyaml", "ruffus", "scanorama", - "scanpy==1.9.7", + "scanpy==1.9.6", "leidenalg", "louvain", "scib", From b32c5e2c955fa0d37daa002c2485df8ce636c812 Mon Sep 17 00:00:00 2001 From: SarahOuologuem Date: Tue, 9 Apr 2024 08:02:16 +0000 Subject: [PATCH 04/10] fix scipy in spatial --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 94bae092..d0593234 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,7 +36,7 @@ dependencies = [ "pyyaml", "ruffus", "scanorama", - "scanpy==1.9.6", + "scanpy==1.9.8", "leidenalg", "louvain", "scib", @@ -62,6 +62,7 @@ spatial = [ "jax==0.4.23", "jaxlib==0.4.23", "scvi-tools==1.0.4", + "scipy==1.12.0", "squidpy", "cell2location", "tangram-sc" From b9c9ac20a2448682314124d54c4adb5e40b38f97 Mon Sep 17 00:00:00 2001 From: SarahOuologuem Date: Tue, 9 Apr 2024 11:26:53 +0000 Subject: [PATCH 05/10] update scanpy --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d0593234..50436cf3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,7 +36,7 @@ dependencies = [ "pyyaml", "ruffus", "scanorama", - "scanpy==1.9.8", + "scanpy>=1.10.1", "leidenalg", "louvain", "scib", From db61ab9a7b37332d22a4cb46b69f5f318d15e26b Mon Sep 17 00:00:00 2001 From: SarahOuologuem Date: Thu, 11 Apr 2024 08:50:59 +0000 Subject: [PATCH 06/10] sum error --- panpipes/python_scripts/plot_qc_spatial.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/panpipes/python_scripts/plot_qc_spatial.py b/panpipes/python_scripts/plot_qc_spatial.py index 7bdfbe7a..7bb70531 100644 --- a/panpipes/python_scripts/plot_qc_spatial.py +++ b/panpipes/python_scripts/plot_qc_spatial.py @@ -160,8 +160,7 @@ #plt.savefig("merfish_histo.png", dpi=300) plt.savefig(figdir + "/histograms."+sprefix +".png", dpi=300) # Adjust dpi as needed plt.close() # Close the figure to free up memory - - + L.info("Done") From b3d366b09a3f5992b184611585570bc128bbea03 Mon Sep 17 00:00:00 2001 From: SarahOuologuem Date: Thu, 11 Apr 2024 09:17:01 +0000 Subject: [PATCH 07/10] fix sum error --- panpipes/python_scripts/plot_qc_spatial.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/panpipes/python_scripts/plot_qc_spatial.py b/panpipes/python_scripts/plot_qc_spatial.py index 7bb70531..4009b1a7 100644 --- a/panpipes/python_scripts/plot_qc_spatial.py +++ b/panpipes/python_scripts/plot_qc_spatial.py @@ -144,7 +144,7 @@ axs[2].set_title("Transcripts per FOV") sns.histplot( - spatial.obs.groupby("fov").sum()["total_counts"], + spatial.obs.groupby('fov')[['total_counts']].sum(), kde=False, ax=axs[2], ) @@ -160,6 +160,7 @@ #plt.savefig("merfish_histo.png", dpi=300) plt.savefig(figdir + "/histograms."+sprefix +".png", dpi=300) # Adjust dpi as needed plt.close() # Close the figure to free up memory + L.info("Done") From 15502128ce61708b0a82f7553e888befb4efcb33 Mon Sep 17 00:00:00 2001 From: SarahOuologuem Date: Thu, 11 Apr 2024 10:22:28 +0000 Subject: [PATCH 08/10] check var index names --- panpipes/python_scripts/run_cell2location.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/panpipes/python_scripts/run_cell2location.py b/panpipes/python_scripts/run_cell2location.py index f1e470c7..52495ee7 100644 --- a/panpipes/python_scripts/run_cell2location.py +++ b/panpipes/python_scripts/run_cell2location.py @@ -266,6 +266,8 @@ cell2loc_plot_QC_reference(model_ref, figdir + "/QC_reference_reconstruction_accuracy.png", figdir + "/QC_reference_expression signatures_vs_avg_expression.png") # save model and update mudata +if adata_sc.var.index.names[0] in adata_sc.var.columns: + adata_sc.var.index.names = [None] mdata_singlecell.mod["rna"] = adata_sc mdata_singlecell.update() if save_models is True: @@ -301,6 +303,8 @@ # save model and update mudata +if adata_st.var.index.names[0] in adata_st.var.columns: + adata_st.var.index.names = [None] mdata_spatial.mod["spatial"] = adata_st mdata_spatial.update() if save_models is True: From 4c1bcef3f674e45b870e2644e6ac2d107b981be5 Mon Sep 17 00:00:00 2001 From: SarahOuologuem Date: Wed, 17 Apr 2024 09:06:08 +0000 Subject: [PATCH 09/10] unpin scanpy as scipy version --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 50436cf3..4b7b8184 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,7 +36,7 @@ dependencies = [ "pyyaml", "ruffus", "scanorama", - "scanpy>=1.10.1", + "scanpy", "leidenalg", "louvain", "scib", @@ -62,7 +62,6 @@ spatial = [ "jax==0.4.23", "jaxlib==0.4.23", "scvi-tools==1.0.4", - "scipy==1.12.0", "squidpy", "cell2location", "tangram-sc" From 8e50a8d184ff1d9244e65e0c5d7edbedfbad2a03 Mon Sep 17 00:00:00 2001 From: SarahOuologuem Date: Wed, 17 Apr 2024 09:21:41 +0000 Subject: [PATCH 10/10] pin scipy for spatial --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 4b7b8184..64a2638e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,6 +62,7 @@ spatial = [ "jax==0.4.23", "jaxlib==0.4.23", "scvi-tools==1.0.4", + "scipy==1.12.0", "squidpy", "cell2location", "tangram-sc"