getDE.limma.2G: Differential Expression Analysis and Differential Activity...

View source: R/pipeline_functions.R

getDE.limma.2GR Documentation

Differential Expression Analysis and Differential Activity Analysis Between 2 Sample Groups Using Limma

Description

getDE.limma.2G is a function performs differential gene expression analysis and differential driver activity analysis between control group (parameter G0) and experimental group (parameter G1), using limma related functions.

Usage

getDE.limma.2G(
  eset = NULL,
  G1 = NULL,
  G0 = NULL,
  G1_name = NULL,
  G0_name = NULL,
  verbose = TRUE,
  random_effect = NULL
)

Arguments

eset

ExpressionSet class object, contains gene expression data or driver activity data.

G1

a vector of characters, the sample names of experimental group.

G0

a vecotr of characters, the sample names of control group.

G1_name

character, the name of experimental group (e.g. "Male"). Default is "G1".

G0_name

character, the name of control group (e.g. "Female"). Default is "G0".

verbose

logical, if TRUE, sample names of both groups will be printed. Default is TRUE.

random_effect

a vector of characters, vector or factor specifying a blocking variable. Default is NULL, no random effect will be considered.

Value

Return a data frame. Rows are genes/drivers, columns are "ID", "logFC", "AveExpr", "t", "P.Value", "adj.P.Val", "B", "Z-statistics", "Ave.G1" and "Ave.G0". Names of the columns may vary from different group names. Sorted by P-values.

Examples

analysis.par <- list()
analysis.par$out.dir.DATA <- system.file('demo1','driver/DATA/',package = "NetBID2")
NetBID.loadRData(analysis.par=analysis.par,step='ms-tab')
phe_info <- Biobase::pData(analysis.par$cal.eset)
each_subtype <- 'G4'
G0  <- rownames(phe_info)[which(phe_info$`subgroup`!=each_subtype)] # get sample list for G0
G1  <- rownames(phe_info)[which(phe_info$`subgroup`==each_subtype)] # get sample list for G1
DE_gene_limma <- getDE.limma.2G(eset=analysis.par$cal.eset,
                                G1=G1,G0=G0,
                                G1_name=each_subtype,
                                G0_name='other')
DA_driver_limma <- getDE.limma.2G(eset=analysis.par$merge.ac.eset,
                                G1=G1,G0=G0,
                                G1_name=each_subtype,
                                G0_name='other')

jyyulab/NetBID documentation built on Dec. 23, 2024, 6:34 a.m.