romanhaa / Cerebro

Visualization of scRNA-seq data.
MIT License
93 stars 19 forks source link

Error: object 'seurat' not found when running 'exportFromSeurat' function #16

Open Puriney opened 4 years ago

Puriney commented 4 years ago

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.

romanhaa commented 4 years ago

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.