detect_batch_effect_express: Quicker function for detection of batch effects

View source: R/detect_batch_effect.R

detect_batch_effect_expressR Documentation

Quicker function for detection of batch effects

Description

This function can be used to check if a dataset contains batch effects. The function employs three different approaches to detect the effects:

  1. The Earth Mover's Distance per marker when comparing each batch-batch pair.

  2. Density plots per marker, per batch for visual inspection.

  3. A MultiDimensional Scaling plot based on the median marker expression per sample. It can apply downsampling for a quicker analysis of larger datasets.

Usage

detect_batch_effect_express(
  df,
  out_dir,
  batch_col = "batch",
  downsample = NULL,
  seed = 472
)

Arguments

df

Tibble containing the expression data and batch information. See prepare_data.

out_dir

Directory for plot output

batch_col

Name of column containing batch information

downsample

Number of cells to include in detection. If not specified, all cells will be used.

seed

Random seed for reproducibility

See Also

Other detect_batch_effect: detect_batch_effect()

Examples

## Not run: 
detect_batch_effect_express(df = exprs, out_dir = '/my/cycombine/dir/')
detect_batch_effect_express(df = exprs, downsample = 100000, out_dir = '/my/cycombine/dir/')

## End(Not run)

biosurf/cyCombine documentation built on May 23, 2024, 4:07 a.m.