DESeq2Report | R Documentation |
This function generates a HTML report with exploratory data analysis plots
for DESeq2 results created with DESeq. Other output formats
are possible such as PDF but lose the interactivity. Users can easily append
to the report by providing a R Markdown file to customCode
, or can
customize the entire template by providing an R Markdown file to
template
.
DESeq2Report(
dds,
project = "",
intgroup,
colors = NULL,
res = NULL,
nBest = 500,
nBestFeatures = 20,
customCode = NULL,
outdir = "DESeq2Exploration",
output = "DESeq2Exploration",
browse = interactive(),
device = "png",
template = NULL,
searchURL = "http://www.ncbi.nlm.nih.gov/gene/?term=",
theme = NULL,
digits = 2,
...
)
dds |
A DESeqDataSet object with the results from running DESeq. |
project |
The title of the project. |
intgroup |
interesting groups: a character vector of names in
|
colors |
vector of colors used in heatmap. If |
res |
A DESeqResults object. If |
nBest |
The number of features to include in the interactive table. Features are ordered by their adjusted p-values. |
nBestFeatures |
The number of best features to make plots of their counts. We recommend a small number, say 20. |
customCode |
An absolute path to a child R Markdown file with code to be evaluated before the reproducibility section. Its useful for users who want to customize the report by adding conclusions derived from the data and/or further quality checks and plots. |
outdir |
The name of output directory. |
output |
The name of output HTML file (without the html extension). |
browse |
If |
device |
The graphical device used when knitting. See more at
http://yihui.name/knitr/options ( |
template |
Template file to use for the report. If not provided, will use the default file found in DESeq2Exploration/DESeq2Exploration.Rmd within the package source. |
searchURL |
A url used for searching the name of the features in
the web. By default |
theme |
A ggplot2 theme to use for the plots made with ggplot2. |
digits |
The number of digits to round to in the interactive table of
the top |
... |
Arguments passed to other methods and/or advanced arguments. Advanced arguments:
|
Set output_format
to 'knitrBootstrap::bootstrap_document'
or
'pdf_document'
if you want a HTML report styled by knitrBootstrap or
a PDF report respectively. If using knitrBootstrap, we recommend the version
available only via GitHub at https://github.com/jimhester/knitrBootstrap
which has nicer features than the current version available via CRAN. You can
also set the output_format
to 'html_document'
for a HTML
report styled by rmarkdown. The default is set to
'BiocStyle::html_document'
.
If you modify the YAML front matter of template
, you can use other
values for output_format
.
The HTML report styled with knitrBootstrap can be smaller in size than the
'html_document'
report.
An HTML report with a basic exploration for the given set of DESeq2 results. See an example at http://leekgroup.github.io/regionReport/reference/DESeq2Report-example/DESeq2Exploration.html.
Leonardo Collado-Torres
## Load example data from the pasilla package as done in the DESeq2 vignette
## at
## <https://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#count-matrix-input>.
library("pasilla")
pasCts <- system.file("extdata",
"pasilla_gene_counts.tsv",
package = "pasilla", mustWork = TRUE
)
pasAnno <- system.file("extdata",
"pasilla_sample_annotation.csv",
package = "pasilla", mustWork = TRUE
)
cts <- as.matrix(read.csv(pasCts, sep = "\t", row.names = "gene_id"))
coldata <- read.csv(pasAnno, row.names = 1)
coldata <- coldata[, c("condition", "type")]
coldata$condition <- factor(coldata$condition)
coldata$type <- factor(coldata$type)
rownames(coldata) <- sub("fb", "", rownames(coldata))
cts <- cts[, rownames(coldata)]
## Create DESeqDataSet object from the pasilla package
library("DESeq2")
dds <- DESeqDataSetFromMatrix(
countData = cts,
colData = coldata,
design = ~condition
)
dds <- DESeq(dds)
## The output will be saved in the 'DESeq2Report-example' directory
dir.create("DESeq2Report-example", showWarnings = FALSE, recursive = TRUE)
## Generate the HTML report
report <- DESeq2Report(dds, "DESeq2-example", c("condition", "type"),
outdir = "DESeq2Report-example"
)
if (interactive()) {
## Browse the report
browseURL(report)
}
## See the example output at
## http://leekgroup.github.io/regionReport/reference/DESeq2Report-example/DESeq2Exploration.html
## Not run:
## Note that you can run the example using:
example("DESeq2Report", "regionReport", ask = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.