Run.GroupTechEffects {GTEs}R Documentation

Compute the group technical effects.

Description

Compute the group technical effects.

Usage

Run.GroupTechEffects(X, meta, g_factor, b_factor, do.scale = FALSE)

Arguments

X

Input data matrix.

meta

Input metadata (data.frame).

g_factor

Group variable (s).

b_factor

Batch variable (s).

do.scale

Whether to perform scaling.

Value

A list containing the overall GTE ($OverallTechEffects) and the GTE ($GroupTechEffects) of each subgroup under the group variable.

Examples

# X is a normalized expression matrix with rows as features and columns as cells.

# meta is a data.frame with columns containing metadata such as cell type, batch, etc.

data_file <- system.file("extdata", "example_data.rds", package = "GTEs")
example_data <- readRDS(data_file)
meta_file <- system.file("extdata", "example_meta.rds", package = "GTEs")
example_meta <- readRDS(meta_file)
GTE_ct <- Run.GroupTechEffects(example_data, example_meta,
                               g_factor = "CellType",
                               b_factor = "Batch")

[Package GTEs version 1.0.0 Index]