deseq2_pairwise: Set up model matrices contrasts and do pairwise comparisons...

View source: R/de_deseq.R

deseq2_pairwiseR Documentation

Set up model matrices contrasts and do pairwise comparisons of all conditions using DESeq2.

Description

Invoking DESeq2 is confusing, this should help.

Usage

deseq2_pairwise(
  input = NULL,
  conditions = NULL,
  batches = NULL,
  model_cond = TRUE,
  model_batch = TRUE,
  model_intercept = FALSE,
  alt_model = NULL,
  extra_contrasts = NULL,
  annot_df = NULL,
  force = FALSE,
  keepers = NULL,
  deseq_method = "long",
  fittype = "parametric",
  ...
)

Arguments

input

Dataframe/vector or expt class containing data, normalization state, etc.

conditions

Factor of conditions in the experiment.

batches

Factor of batches in the experiment.

model_cond

Is condition in the experimental model?

model_batch

Is batch in the experimental model?

model_intercept

Use an intercept model?

alt_model

Provide an arbitrary model here.

extra_contrasts

Provide extra contrasts here.

annot_df

Include some annotation information in the results?

force

Force deseq to accept data which likely violates its assumptions.

keepers

List of explicit contrasts to perform instead of all.

deseq_method

The DESeq2 manual shows a few ways to invoke it, I make 2 of them available here.

fittype

Method to fir the data.

...

Triple dots! Options are passed to arglist.

Details

Like the other _pairwise() functions, this attempts to perform all pairwise contrasts in the provided data set. The details are of course slightly different when using DESeq2. Thus, this uses the function choose_binom_dataset() to try to ensure that the incoming data is appropriate for DESeq2 (if one normalized the data, it will attempt to revert to raw counts, for example). It continues on to extract the conditions and batches in the data, choose an appropriate experimental model, and run the DESeq analyses as described in the manual. It defaults to using an experimental batch factor, but will accept a string like 'sva' instead, in which case it will use sva to estimate the surrogates, and append them to the experimental design. The deseq_method parameter may be used to apply different DESeq2 code paths as outlined in the manual. If you want to play with non-standard data, the force argument will round the data and shoe-horn it into DESeq2.

Value

List including the following information: run = the return from calling DESeq() denominators = list of denominators in the contrasts numerators = list of the numerators in the contrasts conditions = the list of conditions in the experiment coefficients = list of coefficients making the contrasts all_tables = list of DE tables

See Also

[DESeq2] [basic_pairwise()] [limma_pairwise()] [edger_pairwise()] [ebseq_pairwise()] DOI:10.1186/s13059-014-0550-8.

Examples

## Not run: 
 pretend = deseq2_pairwise(data, conditions, batches)

## End(Not run)

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