RausellLab / CelliD

Gene signature extraction and cell-identity recognition at individual cell level from single-cell RNA-seq.
GNU General Public License v3.0
80 stars 19 forks source link

RunCellHGT error #6

Open lyuguol opened 3 years ago

lyuguol commented 3 years ago

Dear CelliD developers,

I am using CelliD to analyze my own scRNA-seq data from 10X genomics. When running the 'RunCellHGT', I encountered the following errors:

Error in rep(seq(length(PathwayMat)), times = PathwayLen) : invalid 'times' argument

or

Error in pathways[sapply(pathways, function(x) length(x) >= minSize)] : invalid subscript type 'list'

Do you know how these happen?

FYI, it is successful to use the data from the Vignette.

Thank you and best, Guoliang

Cortalak commented 3 years ago

Hello, thanks for your feedback

for this error Error in rep(seq(length(PathwayMat)), times = PathwayLen) : invalid 'times' argument

It is most certainly because the pathway argument was not a named list or the geneset size is too short and hence everything is filtered by the minSize argument.

Akira

devashishmohanta commented 3 years ago

Dear @Cortalak I have been using mouse brain sc-RNA seq data to follow the Cell ID pipeline.
There was an issue with the nomenclature since the Panglao database has all the gene names/symbols given in CAPITALS so I tried capitalizing the gene names in my single Cell data to follow the CellID pipeline but it throughs the same error.
I even tried reducing the minSize to see if the error resolves but it throughs the same error again.
Please give any other insights to resolve the error.

Thanks and regards

Cortalak commented 3 years ago

Hello @devashishmohanta ,

That's very strange indeed, could you try something like sapply(geneset, function(x) sum(x %in% rownames(SeuratObject)))

that should throw the number of genes in the geneset that is actually present in the data

Cortalak commented 3 years ago

For instance with a mock example

**library(Seurat)
library(CellID)
ngenes = sapply(Hallmark, function(x) sum(x %in% rownames(pbmc_small)))**       

You should have something like this

image

dnyansagar commented 3 years ago

Hi @Cortalak, I am having the same error message. I am attaching the screenshot of the geneset overlap with my data here. any help would be appreciated

Screenshot 2021-07-01 at 19 02 18
Roger-GOAT commented 3 years ago

@Cortalak Hi Akira, same issue. My samples are mice. So I set

panglao_pancreas <- panglao_pancreas %>%  filter(str_detect(species,"Mm"))

After run

ngenes = sapply(Hallmark, function(x) sum(x %in% rownames(Baron)))

image for

sapply(geneset, function(x) sum(x %in% rownames(SeuratObject)))
Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'X' in selecting a method for function 'sapply': object 'geneset' not found

any help would be appreciated!