MAplot: MAplot

Description Usage Arguments Value Examples

View source: R/runPlots.R

Description

This function plots log2 fold changes (y-axis) versus the mean of normalized counts (on the x-axis). Statistically significant features are colored.

Usage

1
2
3
4
5
6
7
8
MAplot(
  exploredds,
  lfcShrink = FALSE,
  padj.cutoff = 0.05,
  plotly = FALSE,
  savePlot = FALSE,
  filePlot = NULL
)

Arguments

exploredds

object of class DESeq2::DESeqDataSet(), generated from exploreDDS function.

lfcShrink

logiacal. If TRUE adds shrunken log2 fold changes (LFC) to the object.

padj.cutoff

filter cutoffs for the p-value adjusted.

plotly

logical: when FALSE (default), the ggplot2 plot will be returned. TRUE option returns the plotly version of the plot.

savePlot

logical: when FALSE (default), the plot will not be saved. If TRUE the plot will be saved, and requires the filePlot argument.

filePlot

file name where the plot will be saved. For more information, please consult the ggplot2::ggsave() function.

Value

returns an object of ggplot or plotly class.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Targets file
targetspath <- system.file("extdata", "targets.txt", package="systemPipeR")
targets <- read.delim(targetspath, comment="#")
cmp <- systemPipeR::readComp(file=targetspath, format="matrix", delim="-")
## Count table file
countMatrixPath <- system.file("extdata", "countDFeByg.xls", package="systemPipeR")
countMatrix <- read.delim(countMatrixPath, row.names=1)
## Plot
exploredds <- exploreDDS(countMatrix, targets, cmp=cmp[[1]], preFilter=NULL, transformationMethod="raw")
MAplot(exploredds, plotly = FALSE)
MAplot(exploredds, plotly = TRUE)

systemPipeR/spsBio documentation built on Oct. 2, 2020, 9:30 a.m.