contrastSamples: Samples corresponding to a differential expression contrast

contrastSamplesR Documentation

Samples corresponding to a differential expression contrast

Description

Samples corresponding to a differential expression contrast

Usage

contrastSamples(object, ...)

## S4 method for signature 'DESeqAnalysis'
contrastSamples(object, i, quiet = FALSE, return = c("character", "list"))

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.

return

character(1). Return type. Uses match.arg() internally and defaults to the first argument in the character vector.

...

Additional arguments.

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.

Value

  • character: Sample identifiers, corresponding to the column names of DESeqDataSet.

  • list: Named list containing "contrast" and "samples" elements: (1) "contrast": character vector containing metadata on "factor", "numerator", and "denominator" contrast elements; (2) "samples": “listcontaining"numerator"' and '"denominator"' of sample identifiers corresponding to column names of 'DESeqDataSet'.

Note

Updated 2022-05-17.

Examples

data(deseq)

## DESeqAnalysis ====
x <- contrastSamples(deseq, i = 1L, return = "list")
print(x)

x <- contrastSamples(deseq, i = 1L, return = "character")
print(x)

steinbaugh/DESeqAnalysis documentation built on June 25, 2022, 7:29 a.m.