multi_deg_all: multi_deg_all

View source: R/6_multi_deg_all.R

multi_deg_allR Documentation

multi_deg_all

Description

Do differential analysis according to an expression set and group information.

Usage

multi_deg_all(
  exp,
  group_list,
  ids = NULL,
  symmetry = TRUE,
  my_genes = NULL,
  show_rownames = FALSE,
  cluster_cols = TRUE,
  color_volcano = c("#2874C5", "grey", "#f87669"),
  pvalue_cutoff = 0.05,
  logFC_cutoff = 1,
  adjust = TRUE,
  entriz = TRUE,
  change_col = "change",
  annotation_legend = FALSE,
  lab = NA,
  species = "human"
)

Arguments

exp

A numeric matrix

group_list

A character or factor vector with one label per sample; character input will be converted to factor and unused levels will be dropped.

ids

optional probe-to-symbol annotation table. If 'NULL', 'exp' is treated as a gene-level matrix and no ID conversion is performed.

symmetry

a logical value ,would you like to get your plot symmetrical

my_genes

genes for pheatmap

show_rownames

boolean specifying if column names are be shown.

cluster_cols

boolean values determining if columns should be clustered or hclust object.

color_volcano

color for volcano

pvalue_cutoff

Cutoff value of pvalue,0.05 by default.

logFC_cutoff

Cutoff value of logFC,1 by default.

adjust

a logical value; if TRUE, use padj and plot -log10(padj); otherwise use P.value and plot -log10(P.value).

entriz

whether to convert symbols to Entrez IDs

change_col

column name for the up/down/status label. Default uses 'change' when it exists; otherwise the function falls back to the existing automatic classification logic.

annotation_legend

boolean value showing if the legend for annotation tracks should be drawn.

lab

label for x axis in volcano plot; when 'NA', pkg = 4 uses 'log2FoldChange', and the other package codes keep their original labels

species

choose human, mouse, or rat; default is human

Value

a list with deg data.frame, volcano plot and a list with DEGs.

Author(s)

Xiaojie Sun

See Also

geo_download;draw_volcano;draw_venn

Examples

## Not run: 
if(requireNamespace("Biobase",quietly = TRUE)&
   requireNamespace("AnnoProbe",quietly = TRUE)){
gse = "GSE474"
geo = geo_download(gse,destdir=tempdir())
geo$exp[1:4,1:4]
geo$exp=log2(geo$exp+1)
group_list=ifelse(stringr::str_detect(geo$pd$title,"MObese"),"MObese",
ifelse(stringr::str_detect(geo$pd$title,"NonObese"),"NonObese","Obese"))
group_list=factor(group_list,levels = c("NonObese","Obese","MObese"))
find_anno(geo$gpl)
ids = AnnoProbe::idmap(geo$gpl,destdir = tempdir())
dcp = multi_deg_all(geo$exp,
group_list,ids,adjust = FALSE,entriz = FALSE)
dcp[[3]]
}else{
  if(!requireNamespace("AnnoProbe",quietly = TRUE)) {
    warning("Package 'AnnoProbe' needed for this function to work.
         Please install it by install.packages('AnnoProbe')",call. = FALSE)
  }
  if(!requireNamespace("Biobase",quietly = TRUE)) {
    warning("Package 'Biobase' needed for this function to work.
         Please install it by BiocManager::install('Biobase')",call. = FALSE)
  }
}

## End(Not run)

tinyarray documentation built on Aug. 2, 2026, 9:07 a.m.