add_embeddings2scelist: Add embeddings to list of SCEs

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Add embeddings to list of SCEs

Usage

1
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

1
2
3
4
5
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)

corral documentation built on Nov. 8, 2020, 8:25 p.m.