Learn R Programming

DESeq2 (version 1.6.3)

DESeqDataSet-class: DESeqDataSet object and constructors

Description

The DESeqDataSet is a subclass of SummarizedExperiment, used to store the input values, intermediate calculations and results of an analysis of differential expression. The DESeqDataSet class enforces non-negative integer values in the "counts" matrix stored as the first element in the assay list. In addition, a formula which specifies the design of the experiment must be provided. The constructor functions create a DESeqDataSet object from various types of input: a SummarizedExperiment, a matrix, or count files generated by the python package HTSeq. See the vignette for examples of construction from all three input types.

Usage

DESeqDataSet(se, design, ignoreRank = FALSE)
DESeqDataSetFromMatrix(countData, colData, design, ignoreRank = FALSE, ...)
DESeqDataSetFromHTSeqCount(sampleTable, directory = "", design, ignoreRank = FALSE, ...)

Arguments

se
a SummarizedExperiment with at least one column in colData, and the counts as the first element in the assays list, which will be renamed "counts". A SummarizedExperiment object can be generated by the function summarizeOverlaps in the GenomicRanges package.
design
a formula which specifies the design of the experiment, taking the form formula(~ x + y + z). By default, the functions in this package will use the last variable in the formula (e.g. z) for presenting results (fold changes, etc.) and plotting.
ignoreRank
for advanced use only, allows creation of a DESeqDataSet which is not of full rank
countData
for matrix input: a matrix of non-negative integers
colData
for matrix input: a DataFrame or data.frame with at least a single column. Rows of colData correspond to columns of countData.
...
arguments provided to SummarizedExperiment including rowData and exptData
sampleTable
for htseq-count: a data.frame with three or more columns. Each row describes one sample. The first column is the sample name, the second column the file name of the count file generated by htseq-count, and the remaining columns are sample metadata which will be stored in colData
directory
for htseq-count: the directory relative to which the filenames are specified

Value

A DESeqDataSet object.

References

See http://www-huber.embl.de/users/anders/HTSeq for htseq-count

Examples

Run this code
countData <- matrix(1:4,ncol=2)
colData <- data.frame(condition=factor(c("a","b")))
dds <- DESeqDataSetFromMatrix(countData, colData, formula(~ condition))

Run the code above in your browser using DataLab