zhanghao-njmu / SCP

An end-to-end Single-Cell Pipeline designed to facilitate comprehensive analysis and exploration of single-cell data.
https://zhanghao-njmu.github.io/SCP/
GNU General Public License v3.0
357 stars 81 forks source link

adata_to_srt error #134

Open jphe opened 1 year ago

jphe commented 1 year ago

Hi,

When read h5ad file with SCP with this code:

adata <- sc$read_h5ad("test.h5ad")
data1 <- adata_to_srt(adata)

I got an error like bellow:

Error in slot(object = object, name = "features")[[layer]] <- features: more elements supplied than there are to replace
Traceback:

1. adata_to_srt(adata)
2. CreateSeuratObject(counts = x, meta.data = metadata)
3. CreateSeuratObject.default(counts = x, meta.data = metadata)
4. CreateAssay5Object(counts = counts, min.cells = min.cells, min.features = min.features, 
 .     ...)
5. .CreateStdAssay(counts = counts, min.cells = min.cells, min.features = min.features, 
 .     transpose = transpose, type = type, csum = csum, fsum = fsum, 
 .     ...)
6. .CreateStdAssay.list(counts = counts, min.cells = min.cells, 
 .     min.features = min.features, transpose = transpose, type = type, 
 .     csum = csum, fsum = fsum, ...)
7. `LayerData<-`(object = `*tmp*`, layer = layer, features = features[[layer]], 
 .     cells = cells[[layer]], transpose = transpose, value = counts[[layer]])
8. `LayerData<-.Assay5`(object = `*tmp*`, layer = layer, features = features[[layer]], 
 .     cells = cells[[layer]], transpose = transpose, value = counts[[layer]])
pang27149 commented 9 months ago

I got the same error when running RunSCVELO function. Did you solve this problem? For more details, the data I used is the inbuilt example data "pancreas_sub", and I installed SCP in a WSL Ubuntu system. Are there any suggestion?