Hi
I tried saving a Rcpp_SlalomModel object in an RData file, and found out that C++ pointer problems mean that it doesn't work when you then try to reload it.
I appreciate that addResultsToSingleCellExperiment allows you to record some of the results, but (a) it doesn't save them all and (b) you can't use the updated sce object as an input to e.g. plotTerms.
My workaround was the following code:
cpp_names = ls( envir=slalom_model@.xData )
slalom_list = lapply(cpp_names, function(x) slalom_model[[x]])
names(slalom_list) = cpp_names
plus commenting out
if (!methods::is(object, "Rcpp_SlalomModel"))
stop("object must be of class Rcpp_SlalomModel")
in topTerms, plotTerms etc.
I would find it helpful to have some similar save capability, plus making the plotting/topterms functions work with either an Rcpp_SlalomModel object or a saved list / appropriate other data structure. Being able to save model outputs is especially important when you're dealing with large numbers of cells, and trying out lots of factors...
Thanks for all the work on the package!
Will
Hi
I tried saving a
Rcpp_SlalomModelobject in anRDatafile, and found out that C++ pointer problems mean that it doesn't work when you then try to reload it.I appreciate that
addResultsToSingleCellExperimentallows you to record some of the results, but (a) it doesn't save them all and (b) you can't use the updatedsceobject as an input to e.g.plotTerms.My workaround was the following code:
plus commenting out
in
topTerms,plotTermsetc.I would find it helpful to have some similar save capability, plus making the plotting/topterms functions work with either an
Rcpp_SlalomModelobject or a saved list / appropriate other data structure. Being able to save model outputs is especially important when you're dealing with large numbers of cells, and trying out lots of factors...Thanks for all the work on the package!
Will