Error: object 'seurat' not found when running 'exportFromSeurat' function
Puriney opened this issue · 1 comments
Demo
Here is a minimal reproducible example which uses the official Seurat's object and exports it to cerebro file via 'exportFromSeurat'.
library(Seurat)
library(cerebroApp)
cerebroApp::exportFromSeurat(object=pbmc_small, file='./crb.rds', organism='hg', column_cluster='res.0.8', column_sample='orig.ident', experiment_name='pbmc')
Problem
The error is:
Error in cerebroApp::exportFromSeurat(object = pbmc_small, file = "./Downloads/crb.rds", :
object 'seurat' not found
Possible Solution
I was afraid the variable name 'seurat' was hard-written in the function. See these lines in the source code: https://github.com/romanhaa/cerebroApp/blob/e830e9b7191db75214a3fca838e95b9373ba75ed/R/exportFromSeurat.R#L363-L373
It might be the variable named 'export' in the function.
Good catch, there were some references to a seurat
object instead of object
. I pushed the fix to develop and master, should work now. Please let me know if you continue having trouble with the export function.