bm2-lab / scLearn

scLearn:Learning for single cell assignment
34 stars 8 forks source link

Cell assignment Error occurred #5

Closed xiaoqiwang19 closed 3 years ago

xiaoqiwang19 commented 3 years ago

Hello, I encounter a error when run the Cell assignment part:

data2<-readRDS('pancreas_human_segerstolpe.rds') rawcounts2<-assays(data2)[[1]] Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘assays’ for signature ‘"list"’

The pancreas_human_segerstolpe.rds file was downloaded from pre-trained scLearn models of the 30 datasets. How should I deal with such error? Looking forward to your reply .

BinDuan commented 3 years ago

Hello, I encounter a error when run the Cell assignment part:

data2<-readRDS('pancreas_human_segerstolpe.rds') rawcounts2<-assays(data2)[[1]] Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘assays’ for signature ‘"list"’

The pancreas_human_segerstolpe.rds file was downloaded from pre-trained scLearn models of the 30 datasets. How should I deal with such error? Looking forward to your reply .

You got this error, because you don't install "SingleCellExperiment" package. You just need to install "SingleCellExperiment" package, then it will be ok. Hope it helps.

xiaoqiwang19 commented 3 years ago

library(SingleCellExperiment) data2<-readRDS('pancreas_human_segerstolpe.rds') rawcounts2<-assays(data2)[[1]] Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘assays’ for signature ‘"list"’

Still report an error after installing the "SingleCellExperiment" package.

BinDuan commented 3 years ago

library(SingleCellExperiment) data2<-readRDS('pancreas_human_segerstolpe.rds') rawcounts2<-assays(data2)[[1]] Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘assays’ for signature ‘"list"’

Still report an error after installing the "SingleCellExperiment" package.

Sorry not to see your codes clearly before. "pancreas_human_segerstolpe.rds" is not the original data for training, so you can not use it like this. Acturally, it is the pretrained model. You can use "pancreas_human_segerstolpe.rds" like "scLearn_model_learning_result<-readRDS("pancreas_human_segerstolpe.rds")", then use your own dataset as query dataset. I am not sure if I am clear enough. Please read our tutorial again, and I hope it helps. Don't hesitate to contact me if you have other problems to use scLearn. Thank you.