runDGEA: Run Differential Gene Expression Analysis (DGEA)

View source: R/Seurat.Utils.R

runDGEAR Documentation

Run Differential Gene Expression Analysis (DGEA)

Description

Runs a differential gene expression analysis based on specified parameters, reorders clusters if needed, and optionally saves results. Supports output and plotting configurations.

Usage

runDGEA(
  obj,
  param.list = p,
  ident = NULL,
  res.analyzed.DE = if (is.null(ident)) c(0.1) else ident,
  reorder.clusters = if (is.null(ident)) TRUE else FALSE,
  reorder.dimension = 1,
  directory,
  dir_suffix,
  subdirectory = ppp("DGEA_res", idate()),
  add.combined.score = TRUE,
  save.obj = TRUE,
  calculate.DGEA = TRUE,
  plot.DGEA = TRUE,
  umap_caption = "",
  plot.av.enrichment.hist = TRUE,
  plot.log.top.gene.stats = TRUE,
  auto.cluster.naming = TRUE,
  clean.misc.slot = TRUE,
  clean.meta.data = TRUE,
  n.cores = 1,
  presto = TRUE,
  WorkingDir = getwd()
)

Arguments

obj

Seurat object, assumed to be pre-configured with necessary data.

param.list

List of parameters for DE analysis. Default: p.

ident

Use this to specify a non-standard cluster identity, such as named clusters. runDGEA will use this ident explicitly for the DE analysis. Default: NULL.

res.analyzed.DE

Vector of numeric values specifying the resolutions to analyze. Default: c(0.1).

reorder.clusters

Logical indicating whether to reorder clusters based on dimension. Default: TRUE.

reorder.dimension

Integer specifying the dimension for reordering (1 for x, -1 for y). Default: 1.

directory

Character string specifying the base directory for saving results. Default: OutDir

dir_suffix

Character string specifying the suffix for the subdirecotry directory.

subdirectory

Character string specifying the subdirectory for saving outputs within the base directory. Default: "DGEA + date".

add.combined.score

Logical indicating whether to add a combined score to the markers. Default: TRUE.

save.obj

Logical indicating whether to save the modified Seurat object. Default: TRUE.

calculate.DGEA

Logical determining if the DE analysis should be calculated. Default: TRUE.

plot.DGEA

Logical determining if results should be plotted. Default: TRUE.

umap_caption

Character string specifying the caption for the UMAP plot. Default: "".

plot.av.enrichment.hist

Logical indicating whether to plot the average enrichment histogram. Default: TRUE.

plot.log.top.gene.stats

Logical indicating whether to plot the log top gene statistics.

auto.cluster.naming

Logical indicating automatic labeling of clusters. Default: TRUE.

clean.misc.slot

Logical indicating whether to clean the misc slots of previous clustering results. Default: TRUE.

clean.meta.data

Logical indicating whether to clean the metadata slots of previous clustering results. Default: TRUE.

n.cores

Integer specifying the number of cores to use for parallel processing (multisession). Default: 1.

presto

Logical indicating whether to use presto for DE analysis. Default: TRUE.

WorkingDir

Character string specifying the working directory. Default: getwd().

Value

Modified Seurat object and markers list.

Examples

runDGEA(obj = mySeuratObject, param.list = myListParams, directory = "Results/MyAnalysis")


vertesy/Seurat.utils documentation built on Dec. 4, 2024, 5:20 p.m.