add_embeddings2scelist: Add embeddings to list of SCEs

View source: R/utils.R

add_embeddings2scelistR Documentation

Add embeddings to list of SCEs

Description

Add embeddings to list of SCEs

Usage

add_embeddings2scelist(scelist, embeddings, slotname = "corralm")

Arguments

scelist

list of SingleCellExperiments; to which the corresponding embeddings should be added

embeddings

matrix; the embeddings outputted from a dimension reduction, e.g. corralm. Rows in this table correspond to columns in the SCEs in scelist (if all the SCEs were column-bound), and row indices should correspond to cells.

slotname

character; name of the slot for the reduced dim embedding; defaults to corral

Value

list of SingleCellExperiments with respective embeddings stored in them

Examples

library(DuoClustering2018)
sce <- sce_full_Zhengmix4eq()
scelist <- list(sce,sce)
embeddings <- matrix(sample(seq(0,20,1),dim(sce)[2]*6,replace = TRUE),nrow = dim(sce)[2]*2)
scelist <- add_embeddings2scelist(scelist, embeddings)

laurenhsu1/corral documentation built on Feb. 19, 2023, 10:37 p.m.