plotPvalHist: Function plotPvalHist

Description Usage Arguments Value Author(s) Examples

Description

Generate a facet plot (or optionally individual plots) from a dataframe of numbers. Intended to perform histogram analysis of pvalue distributions. But should be useful for any dataframe of numeric columns.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
plotPvalHist(
  P.Val,
  Facet = TRUE,
  savePlot = FALSE,
  fileNames = NULL,
  binWidth = 0.02,
  baseFontSize = 12,
  facetFontSize = NULL,
  alpha = 0.6,
  color = "dodgerblue3",
  fill = "dodgerblue3"
)

Arguments

P.Val

a matrix or dataframe of numeric data; col=samples

Facet

Set to FALSE to print individual plots instead of a facetted plot. (Default = TRUE)

savePlot

TRUE saves the plot(s) to .PNG files

fileNames

Pass a single filename for a facetted plot to save the plot to a file. Pass a list of filenames if Facet=FALSE (length must equal sample count).

binWidth

Range is always 0-1 for pvalues. So this defaults to 0.02

baseFontSize

Set the base font size for the plot using theme_grey (Default=12)

facetFontSize

control font size on the individual plot headers (default=NULL). Allows for fine tuning if the theme_grey default doesn't work for you. 10 seems good for knitr output (dependant on length of your sample titles); bigger (e.g. 14) works better for PPT.

alpha

Set the transparency. (Default = 0.6)

color

Color for the histogram outline (default = "dodgerblue3")

fill

Fill color for the histogram (default = "dodgerblue3")

Value

A ggplot2 object if facet=TRUE or a list of plots if facet=FALSE. (Default = TRUE)

Author(s)

John Thompson, jrt@thompsonclan.org

Examples

1
2
3
4
5
6
7
#Print to console, all defaults
MyPvalMatrix <- extractCol(getType(myDGEobj, "topTable"), "P.Value")
plotPvalHist (MyPvalMatrix)

#Print just to a PNG with some arguments
myplot <- plotPvalHist (MyPValMatrix, savePlot = T, fileNames = "MyPlot.PNG",
               facetFontSize= 14)

jrthompson54/DGE.Tools2 documentation built on May 12, 2021, 8:47 p.m.