---
title:
  - ViDGER Supplementary Material
author:
- name: Brandon Monier
  affiliation:
  - &id South Dakota State University
  - Department of Biology and Microbiology
- name: Adam McDermaid
  affiliation: 
  - *id
  - &id2 Bioinformatics and Mathematical Biosciences Lab
  - &id3 Department of Mathematics and Statistics
- name: Jing Zhao
  affiliation:
  - Population Health Group, Sanford Research
  - Department of Internal Medicine, Sanford School of Medicine
- name: Qin Ma
  affiliation:
  - *id
  - *id2
  - &id4 Department of Agronomy, Horticulture, and Plant Science
  - BioSNTR  
date: "`r format(Sys.Date())`"
abstract: >
  Differential gene expression (DGE) is one of the most common applications
  of RNA-sequencing (RNA-seq) data. This process allows for the elucidation 
  of differentially expressed genes (DEGs) across two or more conditions. 
  Interpretation of the DGE results can be non-intuitive and time consuming 
  due to the variety of formats based on the tool of choice and the numerous 
  pieces of information provided in these results files. Here we present an 
  R package, ViDGER (Visualization of Differential Gene Expression Results 
  using R), which contains nine functions that generate information-rich 
  visualizations for the interpretation of DGE results from three 
  widely-used tools, Cuffdiff, DESeq2, and edgeR.
output: 
  BiocStyle::html_document:
    toc: true
    fig_caption: true
    toc_float: true
    number_sections: false
vignette: >
  %\VignetteIndexEntry{Visualizing RNA-seq data with ViDGER}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
  %\usepackage[utf8]{inputenc}
  %\usepackage{float}      
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(
    fig.path='figure/graphics-', 
    cache.path='cache/graphics-', 
    fig.align='center',
    external=TRUE,
    echo=TRUE,
    warning=FALSE
    # fig.pos="H"
)
```

```{r, echo=FALSE, message=FALSE}
library(vidger)
library(DESeq2)
library(edgeR)
data("df.cuff")
data("df.deseq")
data("df.edger")
```

# Example S1: Installation and data examples
The stable version of this package is available on 
[Bioconductor](https://bioconductor.org/packages/release/bioc/html/vidger.html). You can install it by running the following:

```{r, eval=FALSE, message=FALSE}
if (!requireNamespace("BiocManager", quietly=TRUE))
    install.packages("BiocManager")
BiocManager::install("vidger")
```

The latest **developmental** version of `ViDGER` can be installed via GitHub 
using the `devtools` package:

```{r, eval=FALSE, message=FALSE}
if (!require("devtools")) install.packages("devtools")
devtools::install_github("btmonier/vidger", ref = "devel")
```

Once installed, you will have access to the following functions:

* `vsBoxplot()`
* `vsScatterPlot()`
* `vsScatterMatrix()`
* `vsDEGMatrix()`
* `vsMAPlot()`
* `vsMAMatrix()`
* `vsVolcano()`
* `vsVolcanoMatrix()`
* `vsFourWay()`

Further explanation will be given to how these functions work later on in the
documentation. For the following examples, three toy data sets will be used: 
`df.cuff`, `df.deseq`, and `df.edger`. Each of these data sets reflect the 
three RNA-seq analyses this package covers. These can be loaded in the R 
workspace by using the following command:

```
data(<data_set>)
```

Where `<data_set>` is one of the previously mentioned data sets. Some of the 
recurring elements that are found in each of these functions are the `type`
and `d.factor` arguments. The `type` argument tells the function how to 
process the data for each analytical type (i.e. `"cuffdiff"`, `"deseq"`, or 
`"edger"`). The `d.factor` argument is used specifically for `DESeq2` objects 
which we will discuss in the DESeq2 section. All other arguments are discussed
in further detail by looking at the respective help file for each functions 
(i.e. `?vsScatterPlot`).

\newpage

## An overview of the data used
As mentioned earlier, three toy data sets are included with this package. In 
addition to these data sets, 5 "real-world" data sets were also used. All 
real-world data used is currently unpublished from ongoing collaborations. 
Summaries of this data can be found in the following tables:

Table 1: An overview of the toy data sets included in this package. In this 
table, each data set is summarized in terms of what analytical software was 
used, organism ID, experimental layout (replicates and treatments), number of 
transcripts (IDs), and size of the data object in terms of megabytes (MB).

| Data       | Software | Organism        | Reps | Treat. | IDs   | Size (MB) |
|------------|----------|-----------------|------|--------|-------|-----------|
| `df.cuff`  | CuffDiff | *H*             | 2    | 3      | 1200  | 0.2       |
|            |          | *sapiens*       |      |        |       |           |
| `df.deseq` | DESeq2   | *D.*            | 2    | 3      | 29391 | 2.3       |
|            |          | *melanogaster*  |      |        |       |           |
| `df.deseq` | edgeR    | *A.*            | 2    | 3      | 724   | 0.1       |
|            |          | *thaliana*      |      |        |       |           |

Table 2:  "Real-world" (RW) data set statistics. To test the reliability of
our package, real data was used from human collections and several plant 
samples. Each data set is summarized in terms of organism ID, number of 
experimental samples (n), experimental conditions, and number of transcripts (
IDs).

| Data | Organism   | n  | Exp. Conditions                      | IDs    |
|------|------------|----|--------------------------------------|--------|
| RW-1 | *H.*       | 10 | Two treatment dosages taken at two   | 198002 |
|      | *sapiens*  |    | time points and one control sample   |        |
|      |            |    | taken at one time point              |        |
| RW-2 | *M.*       | 24 | Two phenotypes taken at four time    | 63517  |
|      | *domestia* |    | points (three replicates each)       |        |
| RW-3 | *V.*       | 6  | Two conditions (three replicates     | 59262  |
|      | *ripria*:  |    | each).                               |        |
|      | bud        |    |                                      |        |
| RW-4 | *V.*       | 6  | Two conditions (three replicates     | 17962  |
|      | *ripria*:  |    | each).                               |        |
|      | shoot-tip  |    |                                      |        |
|      | (7 days)   |    |                                      |        |
| RW-5 | *V.*       | 6  | Two conditions (three replicates     | 19064  |
|      | *ripria*:  |    | each).                               |        |
|      | shoot-tip  |    |                                      |        |
|      | (21 days)  |    |                                      |        |



\newpage

# Example S2: Creating box plots
Box plots are a useful way to determine the distribution of data. In this case 
we can determine the distribution of FPKM or CPM values by using the 
`vsBoxPlot()` function. This function allows you to extract necessary 
results-based data from analytical objects to create a box plot comparing 
$log_{10}$ (FPKM or CPM) distributions for experimental treatments.

## With Cuffdiff
```{r, echo=FALSE}
my.cap <- "A box plot example using the `vsBoxPlot()` function with 
`cuffdiff` data. In this example, FPKM distributions for each treatment within 
an experiment are shown in the form of a box and whisker plot."
```
```{r,  message=FALSE, fig.cap=my.cap}
vsBoxPlot(
    data = df.cuff, d.factor = NULL, type = 'cuffdiff', title = TRUE, 
    legend = TRUE, grid = TRUE
)
```

\newpage

## With DESeq2
```{r, echo=FALSE}
my.cap <- "A box plot example using the `vsBoxPlot()` function with 
`DESeq2` data. In this example, FPKM distributions for each treatment within 
an experiment are shown in the form of a box and whisker plot."
```
```{r,  message=FALSE, fig.cap=my.cap}
vsBoxPlot(
    data = df.deseq, d.factor = 'condition', type = 'deseq', 
    title = TRUE, legend = TRUE, grid = TRUE
)
```

\newpage

## With edgeR
```{r, echo=FALSE}
my.cap <- "A box plot example using the `vsBoxPlot()` function with `edgeR` 
data. In this example, CPM distributions for each treatment within an 
experiment are shown in the form of a box and whisker plot"
```
```{r,  message=FALSE, fig.cap=my.cap}
vsBoxPlot(
    data = df.edger, d.factor = NULL, type = 'edger', 
    title = TRUE, legend = TRUE, grid = TRUE
)
```

\newpage

## Aesthetic variants to box plots
`vsBoxPlot()` can allow for different iterations to showcase data 
distribution. These changes can be implemented using the `aes` parameter. 
Currently, there are 6 different variants:

  * `box`: standard box plot
  * `violin`: violin plot
  * `boxdot`: box plot with dot plot overlay
  * `viodot`: violin plot with dot plot overlay
  * `viosumm`: violin plot with summary stats overlay
  * `notch`: box plot with notch

### `box` variant
```{r, echo=FALSE}
my.cap <- "A box plot example using the `aes` parameter: `box`."
```
```{r,  message=FALSE, fig.cap=my.cap}
data("df.edger")
vsBoxPlot(
   data = df.edger, d.factor = NULL, type = "edger", title = TRUE,
   legend = TRUE, grid = TRUE, aes = "box"
)
```

\newpage

### `violin` variant
```{r, echo=FALSE}
my.cap <- "A box plot example using the `aes` parameter: `violin`."
```
```{r,  message=FALSE, fig.cap=my.cap}
data("df.edger")
vsBoxPlot(
   data = df.edger, d.factor = NULL, type = "edger", title = TRUE,
   legend = TRUE, grid = TRUE, aes = "violin"
)
```

\newpage

### `boxdot` variant
```{r, echo=FALSE}
my.cap <- "A box plot example using the `aes` parameter: `boxdot`."
```
```{r,  message=FALSE, fig.cap=my.cap}
data("df.edger")
vsBoxPlot(
   data = df.edger, d.factor = NULL, type = "edger", title = TRUE,
   legend = TRUE, grid = TRUE, aes = "boxdot"
)
```

\newpage

### `viodot` variant
```{r, echo=FALSE}
my.cap <- "A box plot example using the `aes` parameter: `viodot`."
```
```{r,  message=FALSE, fig.cap=my.cap}
data("df.edger")
vsBoxPlot(
   data = df.edger, d.factor = NULL, type = "edger", title = TRUE,
   legend = TRUE, grid = TRUE, aes = "viodot"
)
```

\newpage

### `viosumm` variant
```{r, echo=FALSE}
my.cap <- "A box plot example using the `aes` parameter: `viosumm`."
```
```{r,  message=FALSE, fig.cap=my.cap}
data("df.edger")
vsBoxPlot(
   data = df.edger, d.factor = NULL, type = "edger", title = TRUE,
   legend = TRUE, grid = TRUE, aes = "viosumm"
)
```

\newpage

### `notch` variant
```{r, echo=FALSE}
my.cap <- "A box plot example using the `aes` parameter: `notch`."
```
```{r,  message=FALSE, fig.cap=my.cap}
data("df.edger")
vsBoxPlot(
   data = df.edger, d.factor = NULL, type = "edger", title = TRUE,
   legend = TRUE, grid = TRUE, aes = "notch"
)
```

\newpage

## Color palette variants to box plots
In addition to aesthetic changes, the fill color of each variant can 
also be changed. This can be implemented by modifiying the `fill.color`
parameter. 

The palettes that can be used for this parameter are based off of the
palettes found in the `RColorBrewer` 
[package.](https://cran.r-project.org/web/packages/RColorBrewer/RColorBrewer.pdf) A visual list of all the palettes can be found 
[here.](http://www.r-graph-gallery.com/38-rcolorbrewers-palettes/) 

### Color variant example 1
```{r, echo=FALSE}
my.cap <- "Color variant 1. A box plot example using the `fill.color` 
parameter: `RdGy`."
```
```{r,  message=FALSE, fig.cap=my.cap}
data("df.edger")
vsBoxPlot(
   data = df.edger, d.factor = NULL, type = "edger", title = TRUE,
   legend = TRUE, grid = TRUE, aes = "box", fill.color = "RdGy"
)
```

\newpage

### Color variant example 2
```{r, echo=FALSE}
my.cap <- "Color variant 2. A violin plot example using the `fill.color` 
parameter: `Paired` with the `aes` parameter: `viosumm`."
```
```{r,  message=FALSE, fig.cap=my.cap}
data("df.edger")
vsBoxPlot(
   data = df.edger, d.factor = NULL, type = "edger", title = TRUE,
   legend = TRUE, grid = TRUE, aes = "viosumm", fill.color = "Paired"
)
```

\newpage

### Color variant example 3
```{r, echo=FALSE}
my.cap <- "Color variant 3. A notched box plot example using the `fill.color` 
parameter: `Greys` with the `aes` parameter: `notch`. Using these parameters,
we can also generate grey-scale plots."
```
```{r,  message=FALSE, fig.cap=my.cap}
data("df.edger")
vsBoxPlot(
   data = df.edger, d.factor = NULL, type = "edger", title = TRUE,
   legend = TRUE, grid = TRUE, aes = "notch", fill.color = "Greys"
)
```



\newpage

# Example S3: Creating scatter plots
This example will look at a basic scatter plot function, `vsScatterPlot()`. 
This function allows you to visualize comparisons of $log_{10}$ values of 
either FPKM or CPM measurements of two treatments depending on analytical type.


## With Cuffdiff
```{r, echo=FALSE}
my.cap <- "A scatterplot example using the `vsScatterPlot()` function with 
`Cuffdiff` data. In this visualization, $log_{10}$ comparisons are made of 
fragments per kilobase of transcript per million mapped reads (FPKM) 
measurments. The dashed line represents regression line for the comparison."
```
```{r, message=FALSE, fig.cap=my.cap}
vsScatterPlot(
    x = 'hESC', y = 'iPS', data = df.cuff, type = 'cuffdiff',
    d.factor = NULL, title = TRUE, grid = TRUE
)
```

\newpage 

## With DESeq2
```{r, echo=FALSE}
my.cap <- "A scatterplot example using the `vsScatterPlot()` function with 
`DESeq2` data. In this visualization, $log_{10}$ comparisons are made of 
fragments per kilobase of transcript per million mapped reads (FPKM) 
measurments. The dashed line represents regression line for the comparison."
```
```{r, message=FALSE, fig.cap=my.cap}
vsScatterPlot(
    x = 'treated_paired.end', y = 'untreated_paired.end', 
    data = df.deseq, type = 'deseq', d.factor = 'condition', 
    title = TRUE, grid = TRUE
)
```

\newpage

## With edgeR
```{r, echo=FALSE}
my.cap <- "A scatterplot example using the `vsScatterPlot()` function with 
`edgeR` data. In this visualization, $log_{10}$ comparisons are made of 
fragments per kilobase of transcript per million mapped reads (FPKM) 
measurments. The dashed line represents regression line for the comparison."
```
```{r, message=FALSE, fig.cap=my.cap}
vsScatterPlot(
    x = 'WM', y = 'MM', data = df.edger, type = 'edger',
    d.factor = NULL, title = TRUE, grid = TRUE
)
```



\newpage

# Example S4: Creating scatter plot matrices
This example will look at an extension of the `vsScatterPlot()` function which 
is `vsScatterMatrix()`. This function will create a matrix of all possible 
comparisons of treatments within an experiment with additional info.

## With Cuffdiff
```{r, echo=FALSE}
my.cap <- "A scatterplot matrix example using the `vsScatterMatrix()` 
function with `Cuffdiff` data. Similar to the scatterplot function, this 
visualization allows for all comparisons to be made within an experiment. In 
addition to the scatterplot visuals, FPKM distributions (histograms) and 
correlation (Corr) values are generated."
```
```{r, message=FALSE, fig.cap=my.cap}
vsScatterMatrix(
    data = df.cuff, d.factor = NULL, type = 'cuffdiff', 
    comp = NULL, title = TRUE, grid = TRUE, man.title = NULL
)
```

\newpage

## With DESeq2
```{r, echo=FALSE}
my.cap <- "A scatterplot matrix example using the `vsScatterMatrix()` 
function with `DESeq2` data. Similar to the scatterplot function, this 
visualization allows for all comparisons to be made within an experiment. In 
addition to the scatterplot visuals, FPKM distributions (histograms) and 
correlation (Corr) values are generated."
```
```{r, message=FALSE, fig.cap=my.cap}
vsScatterMatrix(
    data = df.deseq, d.factor = 'condition', type = 'deseq',
    comp = NULL, title = TRUE, grid = TRUE, man.title = NULL
)
```

\newpage

## With edgeR
```{r, echo=FALSE}
my.cap <- "A scatterplot matrix example using the `vsScatterMatrix()` 
function with `edgeR` data. Similar to the scatterplot function, this 
visualization allows for all comparisons to be made within an experiment. In 
addition to the scatterplot visuals, FPKM distributions (histograms) and 
correlation (Corr) values are generated."
```
```{r, message=FALSE, fig.cap=my.cap}
vsScatterMatrix(
    data = df.edger, d.factor = NULL, type = 'edger', comp = NULL,
    title = TRUE, grid = TRUE, man.title = NULL
)
```



\newpage

# Example S5: Creating differential gene expression matrices
Using the `vsDEGMatrix()` function allows the user to visualize the number of 
differentially expressed genes (DEGs) at a given adjusted *p*-value (`padj = `
) for each experimental treatment level. Higher color intensity correlates to 
a higher number of DEGs.

## With Cuffdiff
```{r, echo=FALSE}
my.cap <- "A matrix of differentially expressed genes (DEGs) at a given 
*p*-value using the `vsDEGMatrix()` function with `Cuffdiff` data. With this 
function, the user is able to visualize the number of DEGs ata given adjusted 
*p*-value for each experimental treatment level. Higher color intensity 
correlates to a higher number of DEGs."
```
```{r, message=FALSE, fig.cap=my.cap}
vsDEGMatrix(
    data = df.cuff, padj = 0.05, d.factor = NULL, type = 'cuffdiff', 
    title = TRUE, legend = TRUE, grid = TRUE
)
```

\newpage

## With DESeq2
```{r, echo=FALSE}
my.cap <- "A matrix of differentially expressed genes (DEGs) at a given 
*p*-value using the `vsDEGMatrix()` function with `DESeq2` data. With this 
function, the user is able to visualize the number of DEGs ata given adjusted 
*p*-value for each experimental treatment level. Higher color intensity 
correlates to a higher number of DEGs."
```
```{r, message=FALSE, fig.cap=my.cap}
vsDEGMatrix(
    data = df.deseq, padj = 0.05, d.factor = 'condition', 
    type = 'deseq', title = TRUE, legend = TRUE, grid = TRUE
)
```

\newpage

## With edgeR
```{r, echo=FALSE}
my.cap <- "A matrix of differentially expressed genes (DEGs) at a given 
*p*-value using the `vsDEGMatrix()` function with `edgeR` data. With this 
function, the user is able to visualize the number of DEGs ata given adjusted 
*p*-value for each experimental treatment level. Higher color intensity 
correlates to a higher number of DEGs."
```
```{r, message=FALSE, fig.cap=my.cap}
vsDEGMatrix(
    data = df.edger, padj = 0.05, d.factor = NULL, type = 'edger', 
    title = TRUE, legend = TRUE, grid = TRUE
)
```

\newpage

## Grey-scale DEG matrices
A grey-scale option is available for this function if you wish to use a 
grey-to-white gradient instead of the classic blue-to-white gradient. This
can be invoked by setting the `grey.scale` parameter to `TRUE`.


```{r}
vsDEGMatrix(data = df.deseq, d.factor = "condition", type = "deseq",
    grey.scale = TRUE
)
```



\newpage

# Example S6: Creating MA plots
`vsMAPlot()` visualizes the variance between two samples in terms of gene 
expression values where logarithmic fold changes of count data are plotted 
against mean counts. For more information on how each of the aesthetics are 
plotted, please refer to the figure captions and Method S1.

## With Cuffdiff
```{r, echo=FALSE}
my.cap <- "MA plot visualization using the `vsMAPLot()` function with 
`Cuffdiff` data. LFCs are plotted mean counts to determine the variance 
between two treatments in terms of gene expression. Blue nodes on the graph 
represent statistically significant LFCs which are greater than a given value 
than a user-defined LFC parameter. Green nodes indicate statistically 
significant LFCs which are less than the user-defined LFC parameter. Gray 
nodes are data points that are not statistically significant. Numerical values 
in parantheses for each legend color indicate the number of transcripts that 
meet the prior conditions. Triangular shapes represent values that exceed the 
viewing area of the graph. Node size changes represent the magnitude of the 
LFC values (i.e. larger shapes reflect larger LFC values). Dashed lines 
indicate user-defined LFC values."
```
```{r,  message=FALSE, fig.cap=my.cap}
vsMAPlot(
    x = 'iPS', y = 'hESC', data = df.cuff, d.factor = NULL, 
    type = 'cuffdiff', padj = 0.05, y.lim = NULL, lfc = NULL, 
    title = TRUE, legend = TRUE, grid = TRUE
)
```

\newpage

## With DESeq2
```{r, echo=FALSE}
my.cap <- "MA plot visualization using the `vsMAPLot()` function with 
`DESeq2` data. LFCs are plotted mean counts to determine the variance between 
two treatments in terms of gene expression. Blue nodes on the graph represent 
statistically significant LFCs which are greater than a given value than a 
user-defined LFC parameter. Green nodes indicate statistically significant
LFCs which are less than the user-defined LFC parameter. Gray nodes are data 
points that are not statistically significant. Numerical values in parantheses 
for each legend color indicate the number of transcripts that meet the prior 
conditions. Triangular shapes represent values that exceed the viewing area of 
the graph. Node size changes represent the magnitude of the LFC values (i.e. 
larger shapes reflect larger LFC values). Dashed lines indicate user-defined 
LFC values."
```
```{r,  message=FALSE, fig.cap=my.cap}
vsMAPlot(
    x = 'treated_paired.end', y = 'untreated_paired.end', 
    data = df.deseq, d.factor = 'condition', type = 'deseq', 
    padj = 0.05, y.lim = NULL, lfc = NULL, title = TRUE, 
    legend = TRUE, grid = TRUE
)
```

\newpage

## With edgeR
```{r, echo=FALSE}
my.cap <- "MA plot visualization using the `vsMAPLot()` function with 
`edgeR` data. LFCs are plotted mean counts to determine the variance between 
two treatments in terms of gene expression. Blue nodes on the graph represent 
statistically significant LFCs which are greater than a given value than a 
user-defined LFC parameter. Green nodes indicate statistically significant 
LFCs which are less than the user-defined LFC parameter. Gray nodes are data 
points that are not statistically significant. Numerical values in parantheses 
for each legend color indicate the number of transcripts that meet the prior 
conditions. Triangular shapes represent values that exceed the viewing area of 
the graph. Node size changes represent the magnitude of the LFC values (i.e. 
larger shapes reflect larger LFC values). Dashed lines indicate user-defined 
LFC values."
```
```{r,  message=FALSE, fig.cap=my.cap}
vsMAPlot(
    x = 'WW', y = 'MM', data = df.edger, d.factor = NULL, 
    type = 'edger', padj = 0.05, y.lim = NULL, lfc = NULL, 
    title = TRUE, legend = TRUE, grid = TRUE
)
```



\newpage

# Example S7: Creating MA plot matrices
Similar to a scatter plot matrix, `vsMAMatrix()` will produce visualizations 
for all comparisons within your data set. For more information on how the 
aesthetics are plotted in these visualizations, please refer to the figure 
caption and Method S1.

## With Cuffdiff
```{r, echo=FALSE}
my.cap <- "A MA plot matrix using the `vsMAMatrix()` function with `Cuffdiff` 
data. Similar to the `vsMAPlot()` function, `vsMAMatrix()` will generate a 
matrix of MA plots for all comparisons within an experiment. LFCs are plotted 
mean counts to determine the variance between two treatments in terms of gene 
expression. Blue nodes on the graph represent statistically significant LFCs 
which are greater than a given value than a user-defined LFC parameter. Green 
nodes indicate statistically significant LFCs which are less than the 
user-defined LFC parameter. Gray nodes are data points that are not 
statistically significant. Numerical values in parantheses for each legend 
color indicate the number of transcripts that meet the prior conditions. 
Triangular shapes represent values that exceed the viewing area of the graph. 
Node size changes represent the magnitude of the LFC values (i.e. larger 
shapes reflect larger LFC values). Dashed lines indicate user-defined LFC 
values."
```
```{r,  message=FALSE, fig.cap=my.cap}
 vsMAMatrix(
    data = df.cuff, d.factor = NULL, type = 'cuffdiff', 
    padj = 0.05, y.lim = NULL, lfc = 1, title = TRUE, 
    grid = TRUE, counts = TRUE, data.return = FALSE
)
```

\newpage

## With DESeq2
```{r, echo=FALSE}
my.cap <- "A MA plot matrix using the `vsMAMatrix()` function with `DESeq2` 
data. Similar to the `vsMAPlot()` function, `vsMAMatrix()` will generate a 
matrix of MA plots for all comparisons within an experiment. LFCs are plotted 
mean counts to determine the variance between two treatments in terms of gene 
expression. Blue nodes on the graph represent statistically significant LFCs 
which are greater than a given value than a user-defined LFC parameter. Green 
nodes indicate statistically significant LFCs which are less than the 
user-defined LFC parameter. Gray nodes are data points that are not 
statistically significant. Numerical values in parantheses for each legend 
color indicate the number of transcripts that meet the prior conditions. 
Triangular shapes represent values that exceed the viewing area of the graph. 
Node size changes represent the magnitude of the LFC values (i.e. larger 
shapes reflect larger LFC values). Dashed lines indicate user-defined LFC 
values."
```
```{r,  message=FALSE, fig.cap=my.cap}
vsMAMatrix(
    data = df.deseq, d.factor = 'condition', type = 'deseq', 
    padj = 0.05, y.lim = NULL, lfc = 1, title = TRUE, 
    grid = TRUE, counts = TRUE, data.return = FALSE
)
```

\newpage

## With edgeR
```{r, echo=FALSE}
my.cap <- "A MA plot matrix using the `vsMAMatrix()` function with `edgeR` 
data. Similar to the `vsMAPlot()` function, `vsMAMatrix()` will generate a 
matrix of MA plots for all comparisons within an experiment. LFCs are plotted 
mean counts to determine the variance between two treatments in terms of gene 
expression. Blue nodes on the graph represent statistically significant LFCs 
which are greater than a given value than a user-defined LFC parameter. Green 
nodes indicate statistically significant LFCs which are less than the 
user-defined LFC parameter. Gray nodes are data points that are not 
statistically significant. Numerical values in parantheses for each legend 
color indicate the number of transcripts that meet the prior conditions. 
Triangular shapes represent values that exceed the viewing area of the graph. 
Node size changes represent the magnitude of the LFC values (i.e. larger 
shapes reflect larger LFC values). Dashed lines indicate user-defined LFC 
values."
```
```{r,  message=FALSE, fig.cap=my.cap}
vsMAMatrix(
    data = df.edger, d.factor = NULL, type = 'edger', 
    padj = 0.05, y.lim = NULL, lfc = 1, title = TRUE, 
    grid = TRUE, counts = TRUE, data.return = FALSE
)
```



\newpage

# Example S8: Creating volcano plots
The next few visualizations will focus on ways to display differential gene 
expression between two or more treatments. Volcano plots visualize the variance 
between two samples in terms of gene expression values where the $-log_{10}$ of 
calculated *p*-values (y-axis) are a plotted against the $log_2$ changes 
(x-axis). These plots can be visualized with the `vsVolcano()` function. 
For more information on how each of the aesthetics are plotted, please refer 
to the figure captions and Method S1.

## With Cuffdiff
```{r, echo=FALSE}
my.cap <- "A volcano plot example using the `vsVolcano()` function with 
`Cuffdiff` data. In this visualization, comparisons are made between the 
$-log_{10}$ *p*-value versus the $log_2$ fold change (LFC) between two 
treatments. Blue nodes on the graph represent statistically significant LFCs 
which are greater than a given value than a user-defined LFC parameter. Green 
nodes indicate statistically significant LFCs which are less than the 
user-defined LFC parameter. Gray nodes are data points that are not 
statistically significant. Numerical values in parantheses for each legend 
color indicate the number of transcripts that meet the prior conditions. Left 
and right brackets (< and >) represent values that exceed the viewing area of 
the graph. Node size changes represent the magnitude of the LFC values (i.e. 
larger shapes reflect larger LFC values). Vertical and horizontal lines 
indicate user-defined LFC and adjusted *p*-values, respectively."
```
```{r,  message=FALSE, fig.cap=my.cap}
vsVolcano(
    x = 'iPS', y = 'hESC', data = df.cuff, d.factor = NULL, 
    type = 'cuffdiff', padj = 0.05, x.lim = NULL, lfc = NULL, 
    title = TRUE, legend = TRUE, grid = TRUE, data.return = FALSE
)
```

\newpage

## With DESeq2
```{r, echo=FALSE}
my.cap <- "A volcano plot example using the `vsVolcano()` function with 
`DESeq2` data. In this visualization, comparisons are made between the 
$-log_{10}$ *p*-value versus the $log_2$ fold change (LFC) between two 
treatments. Blue nodes on the graph represent statistically significant LFCs 
which are greater than a given value than a user-defined LFC parameter. Green 
nodes indicate statistically significant LFCs which are less than the 
user-defined LFC parameter. Gray nodes are data points that are not 
statistically significant. Numerical values in parantheses for each legend 
color indicate the number of transcripts that meet the prior conditions. Left 
and right brackets (< and >) represent values that exceed the viewing area of 
the graph. Node size changes represent the magnitude of the LFC values (i.e. 
larger shapes reflect larger LFC values). Vertical and horizontal lines 
indicate user-defined LFC and adjusted *p*-values, respectively."
```
```{r,  message=FALSE, fig.cap=my.cap}
vsVolcano(
    x = 'treated_paired.end', y = 'untreated_paired.end', 
    data = df.deseq, d.factor = 'condition', type = 'deseq', 
    padj = 0.05, x.lim = NULL, lfc = NULL, title = TRUE, 
    legend = TRUE, grid = TRUE, data.return = FALSE
)
```

\newpage

## With edgeR
```{r, echo=FALSE}
my.cap <- "A volcano plot example using the `vsVolcano()` function with 
`edgeR` data. In this visualization, comparisons are made between the 
$-log_{10}$ *p*-value versus the $log_2$ fold change (LFC) between two 
treatments. Blue nodes on the graph represent statistically significant LFCs 
which are greater than a given value than a user-defined LFC parameter. Green 
nodes indicate statistically significant LFCs which are less than the 
user-defined LFC parameter. Gray nodes are data points that are not 
statistically significant. Numerical values in parantheses for each legend 
color indicate the number of transcripts that meet the prior conditions. Left 
and right brackets (< and >) represent values that exceed the viewing area of 
the graph. Node size changes represent the magnitude of the LFC values (i.e. 
larger shapes reflect larger LFC values). Vertical and horizontal lines 
indicate user-defined LFC and adjusted *p*-values, respectively."
```
```{r,  message=FALSE, fig.cap=my.cap}
vsVolcano(
    x = 'WW', y = 'MM', data = df.edger, d.factor = NULL, 
    type = 'edger', padj = 0.05, x.lim = NULL, lfc = NULL, 
    title = TRUE, legend = TRUE, grid = TRUE, data.return = FALSE
)
```



\newpage

# Example S9: Creating volcano plot matrices
Similar to the prior matrix functions, `vsVolcanoMatrix()` will produce 
visualizations for all comparisons within your data set. For more information 
on how the aesthetics are plotted in these visualizations, please refer to the 
figure caption and Method S1.

## With Cuffdiff
```{r, echo=FALSE}
my.cap <- "A volcano plot matrix using the `vsVolcanoMatrix()` function with 
`Cuffdiff` data. Similar to the `vsVolcano()` function, `vsVolcanoMatrix()` 
will generate a matrix of volcano plots for all comparisons within an 
experiment. Comparisons are made between the $-log_{10}$ *p*-value versus the 
$log_2$ fold change (LFC) between two treatments. Blue nodes on the graph 
represent statistically significant LFCs which are greater than a given value 
than a user-defined LFC parameter. Green nodes indicate statistically 
significant LFCs which are less than the user-defined LFC parameter. Gray 
nodes are data points that are not statistically significant. The blue and 
green numbers in each facet represent the number of transcripts that meet the 
criteria for blue and green nodes in each comparison. Left and right brackets 
(< and >) represent values that exceed the viewing area of the graph. Node 
size changes represent the magnitude of the LFC values (i.e. larger shapes 
reflect larger LFC values). Vertical and horizontal lines indicate 
user-defined LFC and adjusted *p*-values, respectively."
```
```{r,  message=FALSE, fig.cap=my.cap}
vsVolcanoMatrix(
    data = df.cuff, d.factor = NULL, type = 'cuffdiff', 
    padj = 0.05, x.lim = NULL, lfc = NULL, title = TRUE, 
    legend = TRUE, grid = TRUE, counts = TRUE
)
```

\newpage

## With DESeq2
```{r, echo=FALSE}
my.cap <- "A volcano plot matrix using the `vsVolcanoMatrix()` function with 
`DESeq2` data. Similar to the `vsVolcano()` function, `vsVolcanoMatrix()` 
will generate a matrix of volcano plots for all comparisons within an 
experiment. Comparisons are made between the $-log_{10}$ *p*-value versus the 
$log_2$ fold change (LFC) between two treatments. Blue nodes on the graph 
represent statistically significant LFCs which are greater than a given value 
than a user-defined LFC parameter. Green nodes indicate statistically 
significant LFCs which are less than the user-defined LFC parameter. Gray 
nodes are data points that are not statistically significant. The blue and 
green numbers in each facet represent the number of transcripts that meet the 
criteria for blue and green nodes in each comparison. Left and right brackets 
(< and >) represent values that exceed the viewing area of the graph. Node 
size changes represent the magnitude of the LFC values (i.e. larger shapes 
reflect larger LFC values). Vertical and horizontal lines indicate 
user-defined LFC and adjusted *p*-values, respectively."
```
```{r,  message=FALSE, fig.cap=my.cap}
vsVolcanoMatrix(
    data = df.deseq, d.factor = 'condition', type = 'deseq', 
    padj = 0.05, x.lim = NULL, lfc = NULL, title = TRUE, 
    legend = TRUE, grid = TRUE, counts = TRUE
)
```

\newpage

## With edgeR
```{r, echo=FALSE}
my.cap <- "A volcano plot matrix using the `vsVolcanoMatrix()` function with 
`edgeR` data. Similar to the `vsVolcano()` function, `vsVolcanoMatrix()` 
will generate a matrix of volcano plots for all comparisons within an 
experiment. Comparisons are made between the $-log_{10}$ *p*-value versus the 
$log_2$ fold change (LFC) between two treatments. Blue nodes on the graph 
represent statistically significant LFCs which are greater than a given value 
than a user-defined LFC parameter. Green nodes indicate statistically 
significant LFCs which are less than the user-defined LFC parameter. Gray 
nodes are data points that are not statistically significant. The blue and 
green numbers in each facet represent the number of transcripts that meet the 
criteria for blue and green nodes in each comparison. Left and right brackets 
(< and >) represent values that exceed the viewing area of the graph. Node 
size changes represent the magnitude of the LFC values (i.e. larger shapes 
reflect larger LFC values). Vertical and horizontal lines indicate 
user-defined LFC and adjusted *p*-values, respectively."
```
```{r,  message=FALSE, fig.cap=my.cap}
vsVolcanoMatrix(
    data = df.edger, d.factor = NULL, type = 'edger', padj = 0.05, 
    x.lim = NULL, lfc = NULL, title = TRUE, legend = TRUE, 
    grid = TRUE, counts = TRUE
)
```



\newpage

# Example S10: Creating four way plots
To create four-way plots, the function, `vsFourWay()` is used. This plot 
compares the $log_2$ fold changes between two samples and a 'control'. For more 
information on how each of the aesthetics are plotted, please refer to the 
figure captions and Method S1.

## With Cuffdiff
```{r, echo=FALSE}
my.cap <- "A four way plot visualization using the `vsFourWay()` function with 
`Cuffdiff` data. In this example, LFCs comparisons between two treatments and
a control are made. Blue nodes indicate statistically significant LFCs which 
are greater than a given user-defined value for both x and y-axes. Green nodes 
reflect statistically significant LFCs which are less than a user-defined 
value for treatment y and greater than said value for treatment x. Similar to 
green nodes, red nodes reflect statistically significant LFCs which are 
greater than a user-defined vlaue treatment y and less than said value for 
treatment x. Gray nodes are data points that are not statistically significant 
for both x and y-axes. Triangular shapes indicate values which exceed the 
viewing are for the graph. Size change reflects the magnitude of LFC values (
i.e. larger shapes reflect larger LFC values). Vertical and horizontal dashed 
lines indicate user-defined LFC values."
```
```{r,  message=FALSE, fig.cap=my.cap}
vsFourWay(
    x = 'iPS', y = 'hESC', control = 'Fibroblasts', data = df.cuff,
    d.factor = NULL, type = 'cuffdiff', padj = 0.05, x.lim = NULL,
    y.lim = NULL, lfc = NULL, legend = TRUE, title = TRUE, grid = TRUE
)
```

\newpage

## With DESeq2
```{r, echo=FALSE}
my.cap <- "A four way plot visualization using the `vsFourWay()` function with 
`DESeq2` data. In this example, LFCs comparisons between two treatments and a 
control are made. Blue nodes indicate statistically significant LFCs which are 
greater than a given user-defined value for both x and y-axes. Green nodes 
reflect statistically significant LFCs which are less than a user-defined 
value for treatment y and greater than said value for treatment x. Similar to 
green nodes, red nodes reflect statistically significant LFCs which are 
greater than a user-defined vlaue treatment y and less than said value for 
treatment x. Gray nodes are data points that are not statistically significant 
for both x and y-axes. Triangular shapes indicate values which exceed the 
viewing are for the graph. Size change reflects the magnitude of LFC values (
i.e. larger shapes reflect larger LFC values). Vertical and horizontal dashed 
lines indicate user-defined LFC values."
```
```{r,  message=FALSE, fig.cap=my.cap}
vsFourWay(
    x = 'treated_paired.end', y = 'untreated_single.read', 
    control = 'untreated_paired.end', data = df.deseq, 
    d.factor = 'condition', type = 'deseq', padj = 0.05, x.lim = NULL, 
    y.lim = NULL, lfc = NULL, legend = TRUE, title = TRUE, grid = TRUE
)
```

\newpage

## With edgeR
```{r, echo=FALSE}
my.cap <- "A four way plot visualization using the `vsFourWay()` function with 
`DESeq2` data. In this example, LFCs comparisons between two treatments and a 
control are made. Blue nodes indicate statistically significant LFCs which are 
greater than a given user-defined value for both x and y-axes. Green nodes 
reflect statistically significant LFCs which are less than a user-defined 
value for treatment y and greater than said value for treatment x. Similar to 
green nodes, red nodes reflect statistically significant LFCs which are 
greater than a user-defined vlaue treatment y and less than said value for 
treatment x. Gray nodes are data points that are not statistically significant 
for both x and y-axes. Triangular shapes indicate values which exceed the 
viewing are for the graph. Size change reflects the magnitude of LFC values (
i.e. larger shapes reflect larger LFC values). Vertical and horizontal dashed 
lines indicate user-defined LFC values."
```
```{r,  message=FALSE, fig.cap=my.cap}
vsFourWay(
    x = 'WW', y = 'WM', control = 'MM', data = df.edger,
    d.factor = NULL, type = 'edger', padj = 0.05, x.lim = NULL,
    y.lim = NULL, lfc = NULL, legend = TRUE, title = TRUE, grid = TRUE
)
```



\newpage

# Example S11: Highlighting data points

## Overview
For point-based plots, users can highlight IDs of interest (i.e. genes, 
transcripts, etc.). Currently, this functionality is implemented in the 
following functions:

  * `vsScatterPlot()`
  * `vsMAPlot()`
  * `vsVolcano()`
  * `vsFourWay()`

To use this feature, simply provide a vector of specified IDs to the 
`highlight` parameter found in the prior functions. An example of a typical
vector would be as follows:

```{r}
important_ids <- c(
  "ID_001",
  "ID_002",
  "ID_003",
  "ID_004",
  "ID_005"
)
important_ids
```

For specific examples using the toy data set, please see the proceeding 4
sub-sections.

\newpage

## Highlighting with `vsScatterPlot()`
```{r, echo=FALSE}
my.cap <- "Highlighting with `vsScatterPlot()`. IDs of interest can be 
identified within basic scatter plots. When highlighted, non-important points
will turn grey while highlighted points will turn blue. Text tags will *try*
to optimize their location within the graph without trying to overlap each
other."
```
```{r,  message=FALSE, fig.cap=my.cap}
data("df.cuff")
hl <- c(
  "XLOC_000033",
  "XLOC_000099",
  "XLOC_001414",
  "XLOC_001409"
)
vsScatterPlot(
    x = "hESC", y = "iPS", data = df.cuff, d.factor = NULL,
    type = "cuffdiff", title = TRUE, grid = TRUE, highlight = hl
)
```

\newpage

## Highlighting with `vsMAPlot()`
```{r, echo=FALSE}
my.cap <- "Highlighting with `vsMAPlot()`. IDs of interest can be 
identified within MA plots. When highlighted, non-important points
will decrease in transparency (i.e. lower alpha values) while highlighted 
points will turn red. Text tags will *try* to optimize their location within 
the graph without trying to overlap each other."
```
```{r,  message=FALSE, fig.cap=my.cap}
hl <- c(
  "FBgn0022201",
  "FBgn0003042",
  "FBgn0031957",
  "FBgn0033853",
  "FBgn0003371"
)
vsMAPlot(
    x = "treated_paired.end", y = "untreated_paired.end",
    data = df.deseq, d.factor = "condition", type = "deseq",
    padj = 0.05, y.lim = NULL, lfc = NULL, title = TRUE,
    legend = TRUE, grid = TRUE, data.return = FALSE, highlight = hl
)
```

\newpage

## Highlighting with `vsVolcano()`
```{r, echo=FALSE}
my.cap <- "Highlighting with `vsVolcano()`. IDs of interest can be 
identified within volcano plots. When highlighted, non-important points
will decrease in transparency (i.e. lower alpha values) while highlighted 
points will turn red. Text tags will *try* to optimize their location within 
the graph without trying to overlap each other."
```
```{r,  message=FALSE, fig.cap=my.cap}
hl <- c(
  "FBgn0036248",
  "FBgn0026573",
  "FBgn0259742",
  "FBgn0038961",
  "FBgn0038928"
)
vsVolcano(
    x = "treated_paired.end", y = "untreated_paired.end",
    data = df.deseq, d.factor = "condition",
    type = "deseq", padj = 0.05, x.lim = NULL, lfc = NULL,
    title = TRUE, grid = TRUE, data.return = FALSE, highlight = hl
)
```

\newpage

## Highlighting with `vsFourWay()`
```{r, echo=FALSE}
my.cap <- "Highlighting with `vsFourWay()`. IDs of interest can be 
identified within four-way plots. When highlighted, non-important points
will decrease in transparency (i.e. lower alpha values) while highlighted 
points will turn dark grey. Text tags will *try* to optimize their location 
within the graph without trying to overlap each other."
```
```{r,  message=FALSE, fig.cap=my.cap}
data("df.edger")
hl <- c(
    "ID_639",
    "ID_518",
    "ID_602",
    "ID_449",
    "ID_076"
)
vsFourWay(
    x = "WM", y = "WW", control = "MM", data = df.edger,
    d.factor = NULL, type = "edger", padj = 0.05, x.lim = NULL,
    y.lim = NULL, lfc = 2, title = TRUE, grid = TRUE,
    data.return = FALSE, highlight = hl
)
```


\newpage

# Example S12: Extracting datasets from plots

## Overview
For **all** plots, users can extract datasets used for the visualizations. 
You may want to pursue this option if you want to use a highly customized
plot script or you would like to perform some unmentioned analysis, for 
example.

To use this this feature, set the `data.return` parameter in the function 
you are using to `TRUE`. You will also need to assign the function to an 
object. See the following example for further details. 


## The data extraction process
In this example, we will use the toy data set `df.cuff`, a cuffdiff output 
on the function `vsScatterPlot()`. Take note that we are assigning the 
function to an object `tmp`:

```{r}
# Extract data frame from visualization
data("df.cuff")
tmp <- vsScatterPlot(
   x = "hESC", y = "iPS", data = df.cuff, d.factor = NULL,
   type = "cuffdiff", title = TRUE, grid = TRUE, data.return = TRUE
)
```
The object we have created is a list with two elements: `data` and `plot`. 
To extract the data, we can call the first element of the list using the 
subset method (`<object>[[1]]`) or by invoking its element name 
(`<object>$data`):

```{r}
df_scatter <- tmp[[1]] ## or use tmp$data
head(df_scatter)
```

## Return the plot
By assigning each of these functions to a list, we can also store the plot
as another element. To extract the plot, we can call the second element of 
the list using the aformentioned procedures:

```{r}
my_plot <- tmp[[2]] ## or use tmp$plot
my_plot
```



\newpage

# Example S13: Changing text sizes

## Overview
For all functions, users can modify the font size of multiple portions of the 
plot. These portions primarily revolve around these components:

  * Axis text and titles
  * Plot title
  * Legend text and titles
  * Facet titles

To manipulate these components, users can modify the default values of the 
following parameters:

  * `xaxis.text.size`
  * `yaxis.text.size`
  * `xaxis.title.size`
  * `yaxis.title.size`
  * `main.title.size`
  * `legend.text.size`
  * `legend.title.size`
  * `facet.title.size`

## What exactly can you manipulate?
Each of parameters mentioned in the prior section refer to numerical values.
These values correlate to font size in typographic points. To illustrate what 
exactly these parameters modify, please refer to the following figure:

```{r, echo=FALSE}
my.cap <- "A visual guide to text size parameters. Users can modify these
components which are highlighted by their respective parameter."
```
```{r, echo=FALSE, fig.cap=my.cap}
knitr::include_graphics("img/text-size-parameters-01.png", auto_pdf = TRUE)
```

The `facet.title.size` parameter refers to the facets which are allocated in
the matrix functions (`vsScatterMatrix()`, `vsMAMatrix()`, 
`vsVolcanoMatrix()`). This is illustrated in the following figure:

```{r, echo=FALSE}
my.cap <- "Location of facet titles. Facet title sizes can be modified using
the `facet.title.size` parameter."
```
```{r, echo=FALSE, fig.cap=my.cap}
knitr::include_graphics("img/text-size-parameters-02.png", auto_pdf = TRUE)
```

Since not all functions are equal in their parameters and component layout,
some functions will either have or lack some of the prior parameters. To 
get an idea of which have functions have which, please refer to the following
figure:

```{r, echo=FALSE}
my.cap <- "An overview of text size parameters for each function. Cells 
highlighted in red refer to parameters (columns) which are found in their
respective functions (rows). Cells which are grey indicate parameters which
are not found in each of the functions."
```
```{r, echo=FALSE, fig.cap=my.cap}
knitr::include_graphics("img/text-size-parameters-03.png", auto_pdf = TRUE)
```




\newpage

# Method S1: Determining data point shape and size changes
The shape and size of each data point will also change depending on several 
conditions. To maximize the viewing area while retaining high resolution, some 
data points will not be present within the viewing area. If they exceed the 
viewing area, they will change shape from a circle to a triangular orientation.

The extent (i.e. fold change) to how far these points exceed the viewing area 
are based on the following criteria:

* **SUB** - values that fall within the viewing area of the plot.
* **T-1** - values that are greater than the maximum viewing area and are 
  less than the 25th percentile of values that exceed the viewing area.
* **T-2** - Similar to **T-1**; values fall between the 25th and 50th 
  percentile.
* **T-3** - Similar to **T-2**; values fall between the 50th and 75th 
  percentile.
* **T-4** - Similar to **T-3**; values fall between the 75th and 100th 
  percentile.

To further clarify theses conditions, please refer to the following figure:

```{r, echo=FALSE}
my.cap <- "An illustration detailing the principles behind the node size for 
the differntial gene expression functions. In this figure, the data points 
increase in size depending on which quartile they reside as the absolute LFC 
increases (top bar). Data points that fall within the viewing area classified 
as SUB while data points that exceed this area are classified as T-1 through 
T-4."
```
```{r, echo=FALSE, fig.cap=my.cap, out.width = "75%"}
knitr::include_graphics("img/lfc-shape.png")
```

\newpage

# Method S2: Determining function performance
Function efficiencies were determined by calculating system times by using the 
`microbenchmark` R package. Each function was ran 100 times with the prior code 
used in the documentation. All benchmarks were determined on a machine running 
a 64-bit Windows 10 operating system, 8 GB of RAM, and an Intel Core i5-6400 
processor running at 2.7 GHz.

## Scatterplots
```{r, echo=FALSE}
my.cap <- "Benchmarks for the `vsScatterPlot()` function. Time (ms) 
distributions were generated for this function using 100 trials for each of
the three RNAseq data objects. Cuffdiff, DESeq2, and edgeR example data sets 
contained 1200, 724, and 29391 transcripts, respectively. "
```
```{r, echo=FALSE, fig.cap=my.cap, out.width = "75%"}
knitr::include_graphics("img/eff-scatter.png", auto_pdf = TRUE)
```

\newpage

## Scatterplot matrices
```{r, echo=FALSE}
my.cap <- "Benchmarks for the `vsScatterMatrix()` function. Time (ms) 
distributions were generated for this function using 100 trials for each of 
the three RNAseq data objects. Cuffdiff, DESeq2, and edgeR example data sets 
contained 1200, 724, and 29391 transcripts, respectively. "
```
```{r, echo=FALSE, fig.cap=my.cap, out.width = "75%"}
knitr::include_graphics("img/eff-smatrix.png", auto_pdf = TRUE)
```

\newpage

## Box plots
```{r, echo=FALSE}
my.cap <- "Benchmarks for the `vsBoxPlot()` function. Time (ms) 
distributions were generated for this function using 100 trials for each of 
the three RNAseq data objects. Cuffdiff, DESeq2, and edgeR example data sets 
contained 1200, 724, and 29391 transcripts, respectively. "
```
```{r, echo=FALSE, fig.cap=my.cap, out.width = "75%"}
knitr::include_graphics("img/eff-box.png", auto_pdf = TRUE)
```

\newpage

## Differential gene expression matrices
```{r, echo=FALSE}
my.cap <- "Benchmarks for the `vsDEGMatrix()` function. Time (ms) 
distributions were generated for this function using 100 trials for each of 
the three RNAseq data objects. Cuffdiff, DESeq2, and edgeR example data sets 
contained 1200, 724, and 29391 transcripts, respectively. "
```
```{r, echo=FALSE, fig.cap=my.cap, out.width = "75%"}
knitr::include_graphics("img/eff-deg.png", auto_pdf = TRUE)
```

\newpage

## Volcano plots
```{r, echo=FALSE}
my.cap <- "Benchmarks for the `vsVolcano()` function. Time (ms) 
distributions were generated for this function using 100 trials for each of 
the three RNAseq data objects. Cuffdiff, DESeq2, and edgeR example data sets 
contained 1200, 724, and 29391 transcripts, respectively. "
```
```{r, echo=FALSE, fig.cap=my.cap, out.width = "75%"}
knitr::include_graphics("img/eff-volcano.png", auto_pdf = TRUE)
```

\newpage

## Volcano plot matrices
```{r, echo=FALSE}
my.cap <- "Benchmarks for the `vsVolcanoMatrix()` function. Time (ms) 
distributions were generated for this function using 100 trials for each of 
the three RNAseq data objects. Cuffdiff, DESeq2, and edgeR example data sets 
contained 1200, 724, and 29391 transcripts, respectively. "
```
```{r, echo=FALSE, fig.cap=my.cap, out.width = "75%"}
knitr::include_graphics("img/eff-vmatrix.png", auto_pdf = TRUE)
```

\newpage

## MA plots
```{r, echo=FALSE}
my.cap <- "Benchmarks for the `vsMAPlot()` function. Time (ms) 
distributions were generated for this function using 100 trials for each of 
the three RNAseq data objects. Cuffdiff, DESeq2, and edgeR example data sets 
contained 1200, 724, and 29391 transcripts, respectively. "
```
```{r, echo=FALSE, fig.cap=my.cap, out.width = "75%"}
knitr::include_graphics("img/eff-maplot.png", auto_pdf = TRUE)
```

\newpage

## MA matrices
```{r, echo=FALSE}
my.cap <- "Benchmarks for the `vsMAMatrix()` function. Time (s) 
distributions were generated for this function using 100 trials for each of 
the three RNAseq data objects. Cuffdiff, DESeq2, and edgeR example data sets 
contained 1200, 724, and 29391 transcripts, respectively. "
```
```{r, echo=FALSE, fig.cap=my.cap, out.width = "75%"}
knitr::include_graphics("img/eff-mamatrix.png", auto_pdf = TRUE)
```

\newpage

## Four way plots
```{r, echo=FALSE}
my.cap <- "Benchmarks for the `vsFourWay()` function. Time (ms) 
distributions were generated for this function using 100 trials for each of 
the three RNAseq data objects. Cuffdiff, DESeq2, and edgeR example data sets 
contained 1200, 724, and 29391 transcripts, respectively. "
```
```{r, echo=FALSE, fig.cap=my.cap, out.width = "75%"}
knitr::include_graphics("img/eff-four.png", auto_pdf = TRUE)
```

\newpage



# Session info
```{r, echo=FALSE}
sessionInfo()
```
