morris-lab / CellOracle

This is the alpha version of the CellOracle package
Other
302 stars 53 forks source link

Error with oracle.import_anndata_as_raw_count #172

Closed Hanxi-002 closed 6 months ago

Hanxi-002 commented 8 months ago

Hi, I encounter the following error when running the function

adata.X = adata.layers["raw"].copy() oracle.import_anndata_as_raw_count(adata=adata, cluster_column_name="louvain", embedding_name="X_tsne")


IndexError: index 999 is out of bounds for axis 0 with size 224

The traceback points to self.score_cv_vs_mean(n, plot=False, max_expr_avg=35) and nth_score = np.sort(score)[::-1][N]

I've checked the dimensions of louvain and umap coordinates and they are correct. I'm not sure where the 224 is coming from.

Any help is appreciated, Thank you!

KenjiKamimoto-ac commented 8 months ago

The error means the number of genes in your dataset is only 224 after some quality checks and filtering. The number is at least 999. If you used a data processing method different from what we recommend in our tutorial, this may be the reason. Can you use our recommended preprocessing below? https://morris-lab.github.io/CellOracle.documentation/tutorials/scrnaprocess.html