vsVolcanoMatrix {vidger} | R Documentation

## Volcano plot matrix from log2 fold changes and -log10(p-values)

### Description

This function allows you to extract necessary results-based data from a DESEq object class to create a volcano plot (i.e. a scatter plot) of the negative log of the p-value versus the log of the fold change while implementing ggplot2 aesthetics for all possible combinations of treatments.

### Usage

    vsVolcanoMatrix(data, d.factor = NULL, type = c("cuffdiff", "deseq",
      "edger"), padj = 0.05, x.lim = NULL, lfc = NULL, title = TRUE,
      legend = TRUE, grid = TRUE, counts = TRUE, data.return = FALSE)

### Arguments

`data` | a cuffdiff, DESeq2, or edgeR object.
`d.factor` | a specified factor; for use with DESeq2 objects only. Defaults to 'NULL'
`type` | an analysis classifier to tell the function how to process the data. Must be either 'cuffdiff', 'deseq', or 'edgeR'.
`padj` | a user defined adjusted p-value cutoff point. Defaults to '0.05'.
`x.lim` | set manual limits to the x axis. Defaults to 'NULL'.
`lfc` | log fold change level for setting conditonals. If no user input is added ('NULL'), value defaults to '1'.
`title` | show title of plot. Defaults to 'TRUE'.
`legend` | shows legend of plot. Defaults to 'TRUE'.
`grid` | show major and minor axis lines. Defaults to 'TRUE'.
`counts` | displays the number of differentially expressed genes for each treatment comparison. Defaults to 'TRUE'.
`data.return` | returns data output of plot if set to 'TRUE'. Defaults to 'FASLSE'.

### Value

An object created by `ggplot`

### Author(s)

Brandon Monier, brandon.monier@sdstate.edu

### Examples

    # Cuffdiff example
    data("df.cuff")
    vsVolcanoMatrix(
     data = df.cuff, d.factor = NULL, type = 'cuffdiff',
     padj = 0.05, x.lim = NULL, lfc = 2, title = TRUE,
     grid = TRUE, counts = TRUE, data.return = FALSE
    )

    # DESeq2 example
    data("df.deseq")
    require(DESeq2)
    vsVolcanoMatrix(
     data = df.deseq, d.factor = 'condition', type = 'deseq',
     padj = 0.05, x.lim = NULL, lfc = 2, title = TRUE,
     grid = TRUE, counts = TRUE, data.return = FALSE
    )

    # edgeR example
    data("df.edger")
    require(edgeR)
    vsVolcanoMatrix(
     data = df.edger, d.factor = NULL, type = 'edger',
     padj = 0.05, x.lim = NULL, lfc = 2, title = TRUE,
     grid = TRUE, counts = TRUE, data.return = FALSE
    )

    # Extract data frame from visualization
    data("df.cuff")
    tmp <- vsVolcanoMatrix(
     data = df.cuff, d.factor = NULL,
     type = 'cuffdiff', padj = 0.05, x.lim = NULL,
     lfc = 2, title = TRUE, grid = TRUE,
     counts = TRUE, data.return = TRUE
    )
    df.vmat <- tmp[[1]]
    head(df.vmat)

[Package vidger version 1.0.0 Index]