This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error in Seurat ScaleData() function

Hey, so I have been having a recurring error for the past week to no avail. Once I perform "FindVariableFeatures()" on a SeuratObject, I get the error:

seurat_object$var.genes<- FindVariableFeautres(seurat_object, selection.method = "vst", nfeatures = 4000)

"Error in ``[<-.data.frame(*tmp*``, , i, value = new("Seurat", assays = list( : replacement has 32285 rows, data has 38328"

I have also looked on the Seurat forum on GitHub, and again not much help. Looking for any input which is much needed. Thank you!

seurat scrna-seq snrna-seq

Please use a code block to paste your code and error. Using inline code doesn't work when the error has back-ticks in it.

Copy and paste the command and error message again, include a blank line at the end. Select all of it then click the 101010 button.

code_formatting

1 answer

Assign the output directly to the Seurat object, not to $…, the method puts the output where it needs to be automatically. Follow the guided tutorials on the Seurat website if you’re new to it.

Thank you so much for your helpful input ATpoint! Simple yet effective and worked!

Please accept the answer (green check mark) to provide closure to this thread.

Log in to answer this question.