Class containing all elements generated during differential expression analysis with DESeq2. This class is essentially a list with validity checks to ensure DESeqTransform and DESeqResults correspond to the DESeqDataSet.

DESeqAnalysis(data, transform, results, lfcShrink = NULL)

Arguments

data

DESeqDataSet.

transform

DESeqTransform. DESeq2::varianceStabilizingTransformation() recommended by default.

results

list or single DESeqResults. One or more unshrunken DESeqResults. Assign the DESeq2::results() return here.

lfcShrink

list, single DESeqResults, or NULL. Optional. One or more shrunken DESeqResults. Assign the DESeq2::lfcShrink() return here.

Value

DESeqAnalysis. Contains a DESeqDataSet, DESeqTransform, and corresponding DESeqResults list.

Slots

data

DESeqDataSet.

transform

DESeqTransform.

results

list. One or more unshrunken DESeqResults.

lfcShrink

list. Optional. One or more shrunken DESeqResults. If set, must correspond to those defined in results. Otherwise, can set as empty list (list()).

DESeqDataSet

We recommend generating the DESeqDataSet by coercion from bcbioRNASeq object using as(dds, "bcbioRNASeq"). Don't use the DESeq2::DESeqDataSet() or DESeq2::DESeqDataSetFromMatrix() constructors to generate the DESeqDataSet object.

DESeqTransform

Object containing variance-stabilized counts. We recommend slotting the return from either DESeq2::varianceStabilizingTransformation() or DESeq2::rlog().

DESeqResults

Don't modify any of the DESeqResults objects manually. This includes rearranging the rows or dropping genes without adjusted P values. We'll take care of this automatically in supported methods.

See also

Examples

#> estimating size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
class(data)
#> [1] "DESeqDataSet" #> attr(,"package") #> [1] "DESeq2"
transform <- varianceStabilizingTransformation(data) class(transform)
#> [1] "DESeqTransform" #> attr(,"package") #> [1] "DESeq2"
#> [1] "Intercept" "condition_B_vs_A"
name <- resultsNames(data)[[2L]] results <- results(data, name = name) class(results)
#> [1] "DESeqResults" #> attr(,"package") #> [1] "DESeq2"
lfcShrink <- lfcShrink(dds = data, res = results, coef = 2L)
#> using 'normal' for LFC shrinkage, the Normal prior from Love et al (2014). #> #> Note that type='apeglm' and type='ashr' have shown to have less bias than type='normal'. #> See ?lfcShrink for more details on shrinkage type, and the DESeq2 vignette. #> Reference: https://doi.org/10.1093/bioinformatics/bty895
results <- list(results) names(results) <- name lfcShrink <- list(lfcShrink) names(lfcShrink) <- name identical(names(results), names(lfcShrink))
#> [1] TRUE
x <- DESeqAnalysis( data = data, transform = transform, results = results, lfcShrink = lfcShrink ) print(x)
#> DESeqAnalysis 0.1.22; DESeq2 1.24.0 #> data: #> dim: 1000 12 #> metadata(1): version #> assays(4): counts mu H cooks #> rownames(1000): gene1 gene2 ... gene999 gene1000 #> rowData names(25): trueIntercept trueBeta ... deviance maxCooks #> colnames(12): sample1 sample2 ... sample11 sample12 #> colData names(2): condition sizeFactor #> transformType: varianceStabilizingTransformation #> resultsNames: condition_B_vs_A #> alpha: 0.1 #> lfcThreshold: 0 #> lfcShrinkType: normal