Relative difference of results

resultsDiff(x, y, ...)

# S4 method for DESeqResults,DESeqResults
resultsDiff(
  x,
  y,
  col = c("log2FoldChange", "stat"),
  deg = c("no", "intersect", "union"),
  alphaThreshold = NULL,
  lfcThreshold = NULL,
  baseMeanThreshold = NULL,
  direction = c("both", "up", "down")
)

# S4 method for DESeqAnalysis,missingOrNULL
resultsDiff(x, y = NULL, i, j, ...)

Arguments

x

Object.

y

Object.

col

character(1). Column to use for difference calculation (subtraction). Note that x/i represents A and y/j B in A - B calculation.

deg

character(1).

  • "no": Return all genes, corresponding to original row names order.

  • "intersect": Return only genes called as DE in both contrasts.

  • "union": Return genes called as DE in either contrast.

alphaThreshold

numeric(1) or NULL. Adjusted P value ("alpha") cutoff. If left NULL, will use the cutoff defined in the object.

lfcThreshold

numeric(1) or NULL. Log (base 2) fold change ratio cutoff threshold. If left NULL, will use the cutoff defined in the object.

baseMeanThreshold

numeric(1) or NULL. Base mean (i.e. average expression across all samples) threshold. If left NULL, will use the cutoff defined in the object. Applies in general to DESeq2 RNA-seq differential expression output.

direction

character(1). Include "both", "up", or "down" directions.

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")
j

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")
...

Additional arguments.

Value

Named numeric. Names correspond to the features (i.e. genes) analyzed.

Functions

  • resultsDiff,DESeqAnalysis,missingOrNULL-method: Passes arguments to DESeqResults method.

Note

Updated 2020-08-05.

Examples

data(deseq) ## DESeqAnalysis ==== diff <- resultsDiff(deseq, i = 1L, j = 2L)
#> condition_B_vs_A (shrunken LFC)
#> treatment_D_vs_C (shrunken LFC)
#> → Calculating relative difference of `log2FoldChange`.
head(diff)
#> gene001 gene002 gene003 gene004 gene005 gene006 #> 0.66765173 0.22417103 0.16879276 0.01535969 -0.22396653 -0.57329468