romanhaa / cerebroPrepare

R package containing functions to prepare single-cell transcriptomics data saved in a Seurat object for visualization in Cerebro, as well as perform few analytical procedures.
MIT License
1 stars 2 forks source link

Load .crb file into R #16

Open davisidarta opened 5 years ago

davisidarta commented 5 years ago

Hi! I'm working with new methods and foud that cerebro was the ideal platform to display the data. Great package!

I wonder if there is any way to load .crb objects back into R. I've tried load with a working cerebro file, but it returns:

Error in load("Ximeraquis.crb") : 
  bad restore file magic number (file may be corrupted) -- no data loaded
In addition: Warning message:
file ‘Ximeraquis.crb’ has magic number 'X'
  Use of save versions prior to 2 is deprecated 

Any clues from the devleopers or the community?

romanhaa commented 5 years ago

Yes you can load them back into R. The .crb files are actually just .rds files with a different extension to signal the user he can load it into Cerebro. So, all you need to do is

my_cerebro_file <- readRDS('<path/to/file.crb>')

and there you have it.

Please note that we are in the process of merging the cerebroPrepare and cerebroApp packages. Afterwards, there will be only cerebroApp which has all the functions that are currently part of cerebroPrepare.