mergeSCEColData: Merging colData from two singleCellExperiment objects

View source: R/mergeSCEColData.R

mergeSCEColDataR Documentation

Merging colData from two singleCellExperiment objects

Description

Merges colData of the singleCellExperiment objects obtained from the same dataset which contain differing colData. (i.e. raw data and filtered data)

Usage

mergeSCEColData(inSCE1, inSCE2, id1 = "column_name", id2 = "column_name")

Arguments

inSCE1

Input SingleCellExperiment object. The function will output this singleCellExperiment object with a combined colData from inSCE1 and inSCE2.

inSCE2

Input SingleCellExperiment object. colData from this object will be merged with colData from inSCE1 and loaded into inSCE1.

id1

Character vector. Column in colData of inSCE1 that will be used to combine inSCE1 and inSCE2. Default "column_name"

id2

Character vector. Column in colData of inSCE2 that will be used to combine inSCE1 and inSCE2. Default "column_name"

Value

SingleCellExperiment object containing combined colData from both singleCellExperiment for samples in inSCE1.

Examples

sce1 <- importCellRanger(
    cellRangerDirs = system.file("extdata/", package = "singleCellTK"),
    sampleDirs = "hgmm_1k_v3_20x20",
    sampleNames = "hgmm1kv3",
    dataType = "filtered")
data(scExample)
sce2 <- sce
sce <- mergeSCEColData(inSCE1 = sce1, inSCE2 = sce2, id1 = "column_name", id2 = "column_name")

compbiomed/singleCellTK documentation built on Oct. 27, 2024, 3:26 a.m.