aristoteleo / spateo-release

Spatiotemporal modeling of spatial transcriptomics
https://spateo-release.readthedocs.io/
BSD 2-Clause "Simplified" License
162 stars 26 forks source link

After installing the latest Spateo, following the tutorial cannot reproduce the results #230

Closed elegantmedstu closed 1 month ago

elegantmedstu commented 6 months ago

Dear author,

I am trying to install the Spateo package and encountered an issue. I set up a conda environment with Python 3.9.0 and installed Spateo using pip install git+https://github.com/aristoteleo/spateo-release. The installation process did not report any errors. Here is the code I used for installation:

mamba create -n Spateo2 python=3.9 -y mamba activate Spateo2 pip install git+https://github.com/aristoteleo/spateo-release However, when following the tutorial (Spatially constrained clustering (SCC) with binning data), I encountered an issue. I downloaded the original h5ad file and ran the code line by line. When executing dyn.tl.louvain(adata_bin60, resolution=0.45), the resulting plot differs from the one in the official tutorial, lacking many clusters. I would like to know if this is expected behavior or if there is an issue with my setup. I would appreciate your guidance on this matter. Here is the code I used:

python

import spateo as st import dynamo as dyn import anndata

Read .h5ad file

adata_bin60 = anndata.read_h5ad('/home/lxx/project/stero空间组测试/cpl/02.bin/mousebrain_bin60.h5ad') adata_bin60 # Preprocessing st.pp.filter.filter_genes(adata_bin60, min_cells=3, inplace=True)

Normalization

dyn.pp.normalize_cell_expr_by_size_factors(adata_bin60, layers="X")

Linear reduction

st.tl.pca_spateo(adata_bin60, n_pca_components=30)

Identify neighbors (KNN)

dyn.tl.neighbors(adata_bin60, n_neighbors=30)

Louvain clustering

dyn.tl.louvain(adata_bin60, resolution=0.45)

st.pl.space(adata_bin60, color=['louvain'], show_legend="upper left", figsize=(4, 3), color_key_cmap="tab20") I would greatly appreciate your assistance in resolving this issue. image

Thank you for your time and support.

Best regards, elegantmedstu

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 14 days

Sichao25 commented 1 month ago

Hi, sorry for the confusion. The package is still under development, so functions and tutorials are updated frequently. Your clustering looks good to me.