Skip to contents

Each column of a contrast matrix represents a pairwise comparison of all samples or cells of a grandR object (or a column annotation table). Elements being 1 are contrasted vs. elements being -1 (and all 0 are irrelevant for this comparison).

Usage

GetPairContrasts(d, name, A, B)

Arguments

d

A grandR object or a column annotation table

name

the name of the contrast

A

definition of the condition of interest, see details

B

definition of the reference condition , see details

Value

A data frame with a single column representig a contrast matrix to be used in ApplyContrasts, LFC, PairwiseDESeq2

Details

This creates a contrast A vs B (i.e. the fold change would be A/B)

Columns that belong to A or B can be given as a logical, integer or character vector representing a selection of the columns (samples or cells). The expression is evaluated in an environment having the Coldata, i.e. you can use names of Coldata as variables to conveniently build a logical vector (e.g., columns=Condition="x").