This is a test version of Biostars. For the public version, visit https://www.biostars.org.
CellCycleScoring in Seurat with custom cell-cycle gene list

I am trying to assign cell-cycle scores to the cells in my scRNA-seq dataset, but I am having problems with the CellCycleScoring() function in Seurat. I am working with zebrafish cells, so I cannot use the stock cc.genes list that is available in seurat. therefore I made my own list and followed the rest of the instructions in the vignette.

I made a vector zfcc.genes and split it into two other vectors:

zfs.genes zfg2m.genes

When I run my command:

zf_cells <- CellCycleScoring(object = zf_cells, s.genes = zfs.genes, g2m.genes = zfg2m.genes, set.ident = TRUE)

I get this series of errors:

Error in AddModuleScore(object = object, genes.list = genes.list, enrich.name = enrich.name, : The following gene lists do not have enough genes present in the object: S.Score exiting...The following gene lists do not have enough genes present in the object: G2M.Score exiting... In addition: Warning message: In AddModuleScore(object = object, genes.list = genes.list, enrich.name = enrich.name, : Could not find enough genes in the object from the following gene lists: S.Score Attempting to match case...Could not find enough genes in the object from the following gene lists: G2M.Score Attempting to match case...

The list of genes I made is slightly shorter than the one provided with seurat. By about 4 genes. Is it really looking for the exact number of genes in the stock list? I don't see why this would be the case. Shouldn't you be able to build your own list of genes? I think I'm misunderstanding the problem.

seurat rna-seq r

2 answers

It checks if the length is greater than 0. I assume that the reason for the error is that some of your cell cycle genes do not match the genes in your Seurat object genes.

Try checking the overlap manually like:

intersect(zfs.genes, rownames(zf_cells@data))

Additionally, this type of question is probably better to ask in the Seurat repo: https://github.com/satijalab/seurat/issues

Hi,

I got the exact same problem, I was wondering if you found a solution ? I verified and all the marker genes I provided are present in my dataset, so it doesn't seems to be the issue

Thank in advance for your help,

Hello, I also encounterred this Seurat v3.0 CellCycleScoring Error.And I have normalized my data and try it again as you said.But it didn't work. Do you have any other solutions?

> cc.genes <- readLines(con = "D:/personal data/cell_cycle_vignette_files/regev_lab_cell_cycle_genes.txt")`
> cc.genes <- str_to_title(cc.genes)
> s.genes <- cc.genes[1:43]
> g2m.genes <- cc.genes[44:97]
> length(x = which(x = s.genes %in% rownames(x = GetAssayData(tc11))))
[1] 42
> length(x = which(x = g2m.genes %in% rownames(x = GetAssayData(tc11))))
[1] 52
> tc11 <- CellCycleScoring(object = tc11, s.features = s.genes, g2m.features = g2m.genes, set.ident = TRUE)
Error: Insufficient data values to produce 24 bins.

How big is your object? Just run tc11.

Log in to answer this question.