Tempora
Tempora copied to clipboard
getMD from SingleCellExperiment object
I am working with SingleCellExperiment objects. It seems that SingleCellExperiment::colData returns a "DFrame" and that reshape2::dcast in CreateTemporaObject requires a data.frame.
suppressMessages(
setMethod("getMD","SingleCellExperiment",
function(x) SingleCellExperiment::colData(x))
)
Otherwise, I get an error message:
dcast Error in FUN(X[[i]], ...) : envir must be either NULL, a list, or an environment.
Replacing the above code in dataAccess.R with
suppressMessages(
setMethod("getMD","SingleCellExperiment",
function(x) data.frame(SingleCellExperiment::colData(x)))
)
resolves this issue.