DESeqDataSet is a subclass of RangedSummarizedExperiment,
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 RangedSummarizedExperiment, a matrix, count files generated by
the python package HTSeq, or a list from the tximport function in the
tximport package.
See the vignette for examples of construction from different types.
a RangedSummarizedExperiment with columns of variables
indicating sample information in colData,
and the counts as the first element in the assays list, which will
be renamed "counts". A RangedSummarizedExperiment object can be
generated by the function summarizeOverlaps in the GenomicAlignments
package.
design
a formula which expresses how the counts for each gene
depend on the variables in colData. Many R formula are valid,
including designs with multiple variables, e.g., ~ group + condition,
and designs with interactions, e.g., ~ genotype + treatment + genotype:treatment.
See results for a variety of designs and how to extract results tables.
By default, the functions in this package will use
the last variable in the formula for building results tables and plotting.
~ 1 can be used for no design, although users need to remember
to switch to another design for differential testing.
ignoreRank
use of this argument is reserved for DEXSeq developers only.
Users will immediately encounter an error upon trying to estimate dispersion
using a design with a model matrix which is not 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
tidy
for matrix input: whether the first column of countData is the rownames for the count matrix
...
arguments provided to SummarizedExperiment including rowRanges and metadata. Note that
for Bioconductor 3.1, rowRanges must be a GRanges or GRangesList, with potential metadata columns
as a DataFrame accessed and stored with mcols. If a user wants to store metadata columns
about the rows of the countData, but does not have GRanges or GRangesList information,
first construct the DESeqDataSet without rowRanges and then add the DataFrame with mcols(dds).
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. defaults to current directory
txi
for tximport: the simple list output of the tximport function
Details
Note on the error message "assay colnames() must be NULL or equal colData rownames()":
this means that the colnames of countData are different than the rownames of colData.
Fix this with: colnames(countData) <- NULL
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(DESeq2)
Loading required package: S4Vectors
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
rbind, rownames, sapply, setdiff, sort, table, tapply, union,
unique, unsplit
Attaching package: 'S4Vectors'
The following objects are masked from 'package:base':
colMeans, colSums, expand.grid, rowMeans, rowSums
Loading required package: IRanges
Loading required package: GenomicRanges
Loading required package: GenomeInfoDb
Loading required package: SummarizedExperiment
Loading required package: Biobase
Welcome to Bioconductor
Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/DESeq2/DESeqDataSet.Rd_%03d_medium.png", width=480, height=480)
> ### Name: DESeqDataSet-class
> ### Title: DESeqDataSet object and constructors
> ### Aliases: DESeqDataSet DESeqDataSet-class DESeqDataSetFromHTSeqCount
> ### DESeqDataSetFromMatrix DESeqDataSetFromTximport
>
> ### ** Examples
>
>
> countData <- matrix(1:100,ncol=4)
> condition <- factor(c("A","A","B","B"))
> dds <- DESeqDataSetFromMatrix(countData, DataFrame(condition), ~ condition)
>
>
>
>
>
>
> dev.off()
null device
1
>