## Load example data from the pasilla package
library('pasilla')
library('DESeq')
library('DESeq2')
## Create DESeqDataSet object from the pasilla package
data('pasillaGenes')
countData <- counts(pasillaGenes)
colData <- pData(pasillaGenes)[, c('condition', 'type')]
dds <- DESeqDataSetFromMatrix(countData = countData,
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)
}
## Note that you can run the example using:
example('DESeq2Report', 'regionReport', ask=FALSE)
Run the code above in your browser using DataLab