#' Convert: \code{CellTypeDataset} ==> \code{SingleCellExperiment}
#'
#' @inheritParams converters
#' @inheritParams to_se
#' @export
#' @examples
#' obj <- example_obj("ctd")
#' obj <- ctd_to_se(obj)
ctd_to_se <- function(obj,
as_sce=FALSE,
as_sparse=TRUE,
as_delayedarray=FALSE,
verbose=TRUE){
requireNamespace("EWCE")
messager_to()
if(is_ctd(obj)){
obj2 <- EWCE::ctd_to_sce(object = obj,
as_sparse = as_sparse,
as_DelayedArray = as_delayedarray,
verbose = verbose)
} else{
stopper("obj must be a CellTypeDataset",
"generated by EWCE::generate_celltype_data().")
}
if(isFALSE(as_sce)){
obj2 <- lapply(obj2,sce_to_se, verbose = verbose)
}
return(obj2)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.