% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/6_multi_deg_all.R
\name{plot_deg}
\alias{plot_deg}
\title{plot_deg}
\usage{
plot_deg(
  exp,
  group_list,
  deg,
  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,
  change_col = "change",
  annotation_legend = FALSE,
  lab = NA,
  species = "human"
)
}
\arguments{
\item{exp}{A numeric matrix}

\item{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.}

\item{deg}{result of multi_deg or get_deg function}

\item{symmetry}{a logical value ,would you like to get your plot symmetrical}

\item{my_genes}{genes for pheatmap}

\item{show_rownames}{boolean specifying if column names are be shown.}

\item{cluster_cols}{boolean values determining if columns should be clustered or \code{hclust} object.}

\item{color_volcano}{color for volcano}

\item{pvalue_cutoff}{Cutoff value of pvalue,0.05 by default.}

\item{logFC_cutoff}{Cutoff value of logFC,1 by default.}

\item{adjust}{a logical value; if TRUE, use \code{padj} and plot
\code{-log10(padj)}; otherwise use \code{P.value} and plot
\code{-log10(P.value)}.}

\item{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.}

\item{annotation_legend}{boolean value showing if the legend for annotation 
tracks should be drawn.}

\item{lab}{label for  x axis in volcano plot; when `NA`, pkg = 4 uses
`log2FoldChange`, and the other package codes keep their original labels}

\item{species}{choose human, mouse, or rat; default is human}
}
\value{
plots
}
\description{
Plot PCA, volcano, heatmap, and Venn plots for differential analysis
results.
}
\examples{
\dontrun{
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())
deg = get_deg(geo$exp,group_list,ids,adjust = FALSE,entriz = FALSE)
plot_deg(geo$exp,group_list,deg)
}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)
  }
}
}
}
\author{
Xiaojie Sun
}
