Closed LTLA closed 3 years ago
Ugh. Ugly but it mostly works.
library(SingleCellExperiment) example(SingleCellExperiment) # Dropping one of the reduced dims. sce2 <- sce reducedDim(sce2, "PCA") <- NULL # Mocking up some alternative Experiments. se1 <- SummarizedExperiment(list(counts=matrix(rpois(ncol(sce) * 5, 5), ncol=ncol(sce)))) rownames(se1) <- sprintf("SPIKE_%s", seq_len(nrow(se1))) altExp(sce2, "THING") <- se1 combineCols(sce, sce2, use.names=FALSE) ## class: SingleCellExperiment ## dim: 200 200 ## metadata(0): ## assays(2): counts logcounts ## rownames: NULL ## rowData names(0): ## colnames: NULL ## colData names(0): ## reducedDimNames(2): PCA tSNE ## mainExpName: NULL ## altExpNames(1): THING
Ugh. Ugly but it mostly works.