data2intelligence / SpaCET

Spatial Cellular Estimator for Tumors
GNU General Public License v3.0
41 stars 4 forks source link

Error in SpaCET.deconvolution #25

Open MartaCasado opened 8 months ago

MartaCasado commented 8 months ago

Hello! Thank you for creating SpaCET. I am encountering an error in the deconvolution step:

SpaCET_obj <- create.SpaCET.object.10X(visiumPath = dataDir)
SpaCET_obj <- SpaCET::SpaCET.quality.control(SpaCET_obj)
SpaCET_obj <- SpaCET::SpaCET.deconvolution(SpaCET_obj, cancerType="PANCAN", coreNo=8)
[1] "0 spots are removed."
[1] "4424 spots are kept."
[1] "Stage 1. Infer malignant cell fraction."
[1] "Stage 1 - Step 1. Clustering."
[1] "Stage 1 - Step 2. Find tumor clusters."
[1] "                  > Use expr signature: PANCAN"
[1] "Stage 1 - Step 3. Infer malignant cells."
[1] "Stage 2. Hierarchically deconvolve non-malignant cell fraction."
[1] "Stage 2 - Level 1. Estimate the major lineage."
Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE,  : 
  arguments imply differing number of rows: 0, 12
Calls: run_spaCET ... as.data.frame -> as.data.frame.list -> do.call -> <Anonymous>

Also, convert.Seurat and addTo.Seurat are very useful functions! However, they do not work with Seurat v5:

Error in SpaCET::convert.Seurat(data) : no slot of name "counts" for this object of class "Assay5"

Have you thought of updating them to work in the objects of seurat v5?

Thank you!!

beibeiru commented 8 months ago

Hi, @MartaCasado

Thank you for your interest in SpaCET. Would you please upload your SpaCET_obj to the following link? I will fix the error soon.

Also, thank you for letting me know that some functions from SpaCET do not work with Seurat v5. I will update them later.

Best, Beibei

MartaCasado commented 8 months ago

Hi! It is already uploaded! Thank you

beibeiru commented 8 months ago

Hi, @MartaCasado

It is a little weird. I ran SpaCET.deconvolution against your SpaCET_obj in both my PC and our HPC. All do work. The deconvolution results have been sent to your email. Could you reinstall our latest R package and try again? Please let me know whether it works. BTW, I have updated convert.Seurat and addTo.Seurat, which can work for Seurat v5.

Best, Beibei

MartaCasado commented 8 months ago

Hi @beibeiru,

I have reinstalled the package and the error is now fixed. Thank you for updating those functions!!

Best, Marta