This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Seurat -FindVariableGenes problem

I am using Seurat to find variable genes , my code is :

f <- FindVariableGenes(object = f, mean.function = ExpMean, dispersion.function = LogVMR, x.low.cutoff = 0, x.high.cutoff = 3, y.cutoff = 0.5)

And I got this error:

Calculating gene means
0%   10   20   30   40   50   60   70   80   90   100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Calculating gene variance to mean ratios
0%   10   20   30   40   50   60   70   80   90   100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Error in seq.int(rx[1L], rx[2L], length.out = nb) : 
  'to' must be a finite number

Can anyone help me solve this error? Thanks a lot.

software error seurat findvariablegenes

Examples of relevant tags for this question would be Seurat and FindVariableGenes. software error is so generic that the tag has lost all meaning. It's a relevant tag here, but you would benefit from adding more relevant tags, especially the tool name as a lot of people filter by tool name to answer questions.

I've added these tags for you now. The Contact page for Seurat also says:

Please e-mail seuratpackage@gmail.com with any questions about the software. For technical issues, if possible, please include an input file and R markdown instructions for reproducing the problem.

Maybe you could try that also and post here if you get a solution to this problem?

This may or may not be causing the error, but x.low.cutoff (bottom cutoff on x-axis for identifying variable genes) should probably be higher than 0.

1 answer

Make sure you run NormalizeData prior to running FindVariableGenes. Not doing so can cause this error in some cases.

I solved this problem by doing so.

Yes. Follow the instructions in the tutorial. There are a lot of steps and they have a specific order.

Log in to answer this question.