iobr_deg: iobr_deg

View source: R/iobr_deg.R

iobr_degR Documentation

iobr_deg

Description

This function performs differential expression analysis on gene expression data using the DESeq2 or limma method. It filters low count data, calculates fold changes and adjusted p-values, and identifies differentially expressed genes (DEGs) based on specified cutoffs. It also provides optional visualization tools such as volcano plots and heatmaps. The function saves the results as an RData file and an Excel file.

Usage

iobr_deg(
  eset,
  annotation = NULL,
  id_anno = NULL,
  pdata,
  group_id = "group",
  pdata_id = "ID",
  array = FALSE,
  method = "DESeq2",
  contrast = c("High", "Low"),
  path = NULL,
  padj_cutoff = 0.01,
  logfc_cutoff = 0.5,
  volcano_plot = FALSE,
  col_volcano = 1,
  heatmap = TRUE,
  col_heatmap = 1,
  parallel = FALSE
)

Arguments

eset

The gene expression data matrix

annotation

(Optional) The annotation object for mapping gene IDs to gene names. Default is NULL.

id_anno

Identifier of annotation data matched to row names of eset

pdata

The DataFrame containing sample information and group labels.

group_id

The column name in "pdata" that specifies the group labels. Default value is "group".

pdata_id

The column name in "pdata" that specifies the sample IDs. Default value is "ID".

array

Logical value indicating whether to normalize the gene expression data using quantile normalization. Default value is TRUE.

method

The method to be used for differential expression analysis. Options are "DESeq2" or "limma". Default value is "DESeq2".

contrast

A character vector specifying the contrast for the analysis. The first and second elements are the names of the two groups being compared. Default value is "High" and "Low".

path

path to save results

padj_cutoff

The adjusted p-value cutoff for determining significance. Default value is 0.01.

logfc_cutoff

The log2 fold change cutoff for determining significance. Default value is 0.5.

volcano_plot

Logical value indicating whether to generate a volcano plot. Default value is FALSE.

col_volcano

The color index for plotting the volcano plot. Default value is 1.

heatmap

Logical value indicating whether to generate a heatmap. Default value is TRUE.

col_heatmap

The color index for plotting the heatmap. Default value is 1.

parallel

default is FALSE

Value

DEG object

Author(s)

Dongqiang Zeng

Examples


data("eset_stad", package = "IOBR")
data("stad_group", package = "IOBR")
library(DESeq2)
deg<- iobr_deg(eset  = eset_stad, pdata = stad_group, group_id = "subtype", pdata_id = "ID", array = FALSE, method = "DESeq2", contrast = c("EBV","GS"), path = "STAD")

IOBR/IOBR documentation built on May 5, 2024, 2:34 p.m.