Skip to content

Commit

Permalink
Merge pull request #251 from DendrouLab/sarah_scanpy_version
Browse files Browse the repository at this point in the history
fix scanpy version
  • Loading branch information
bio-la authored Apr 22, 2024
2 parents 73b437e + 8e50a8d commit 78e62f2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
6 changes: 3 additions & 3 deletions panpipes/python_scripts/plot_qc_spatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -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],
)
Expand All @@ -160,8 +160,8 @@
#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")

4 changes: 4 additions & 0 deletions panpipes/python_scripts/run_cell2location.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dependencies = [
"pyyaml",
"ruffus",
"scanorama",
"scanpy>=1.9.1",
"scanpy",
"leidenalg",
"louvain",
"scib",
Expand All @@ -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"
Expand Down

0 comments on commit 78e62f2

Please sign in to comment.