make_pairwise_contrasts: Run makeContrasts() with all pairwise comparisons.

View source: R/de_shared.R

make_pairwise_contrastsR Documentation

Run makeContrasts() with all pairwise comparisons.

Description

In order to have uniformly consistent pairwise contrasts, I decided to avoid potential human erors(sic) by having a function generate all contrasts.

Usage

make_pairwise_contrasts(
  model,
  conditions,
  do_identities = FALSE,
  do_extras = TRUE,
  do_pairwise = TRUE,
  keepers = NULL,
  extra_contrasts = NULL,
  ...
)

Arguments

model

Describe the conditions/batches/etc in the experiment.

conditions

Factor of conditions in the experiment.

do_identities

Include all the identity strings? Limma can use this information while edgeR can not.

do_extras

Include extra contrasts? This seems redundant with extra_contrasts below, but there is a reason for it.

do_pairwise

Include all pairwise strings? This shouldn't need to be set to FALSE, but just in case.

keepers

Only extract this subset of all possible pairwise contrasts.

extra_contrasts

Optional string of extra contrasts to include.

...

Extra arguments passed here are caught by arglist.

Details

Invoked by the _pairwise() functions.

Value

List including the following information:

  1. all_pairwise_contrasts = the result from makeContrasts(...)

  2. identities = the string identifying each condition alone

  3. all_pairwise = the string identifying each pairwise comparison alone

  4. contrast_string = the string passed to R to call makeContrasts(...)

  5. names = the names given to the identities/contrasts

See Also

[limma::makeContrasts()]

Examples

## Not run: 
 pretend <- make_pairwise_contrasts(model, conditions)

## End(Not run)

elsayed-lab/hpgltools documentation built on May 9, 2024, 5:02 a.m.