Samples corresponding to a differential expression contrast

# S4 method for DESeqAnalysis
contrastSamples(object, results)

Arguments

object

Object.

results

character(1) or integer(1). Name or position of DESeqResults.

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

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, results = 1L)
#> DESeqResults: condition B vs A (shrunken LFC)
#> Factor column: condition
#> Numerator samples: sample07, sample08, sample09, sample10, sample11, sample12
#> Denominator samples: sample01, sample02, sample03, sample04, sample05, sample06
#> [1] "sample07" "sample08" "sample09" "sample10" "sample11" "sample12" #> [7] "sample01" "sample02" "sample03" "sample04" "sample05" "sample06"