Samples corresponding to a differential expression contrast

contrastSamples(object, ...)

# S4 method for DESeqAnalysis
contrastSamples(object, i, quiet = FALSE)

Arguments

object

Object.

i

Indices specifying elements to extract or replace. Indices are numeric or character vectors, empty (missing), or NULL.

For more information:

help(topic = "Extract", package = "base")
quiet

logical(1). Perform command quietly, suppressing messages.

...

Additional arguments.

Value

character. Sample identifiers.

Details

Match the samples in a DESeqDataSet used to define contrast in a corresponding DESeqResults object. Note that this only works for simple (e.g. pairwise) contrasts and will intentionally error for more complex comparisons.

Note

Updated 2021-03-15.

EXPERIMENTAL. This approach will error intentionally for DESeqResults objects generated with complex contrasts (e.g. interaction effect or LRT). It may be removed in a future release if this approach is too error-prone.

Examples

data(deseq) ## DESeqAnalysis ==== contrastSamples(deseq, i = 1L)
#> Contrast: condition_B_vs_A
#> Factor column: condition
#> Numerator samples: sample07, sample08, sample09, sample10, sample11, sample12
#> Denominator samples: sample01, sample02, sample03, sample04, sample05, sample06
#> [1] "sample01" "sample02" "sample03" "sample04" "sample05" "sample06" #> [7] "sample07" "sample08" "sample09" "sample10" "sample11" "sample12"