make.contrast.list: Create contrast lists from contrast vectors

Description Usage Arguments Value Author(s) Examples

View source: R/metaseqr.util.R

Description

Returns a list, properly structured to be used within the stat.* functions of the metaseqr package. See the main documentation for the structure of this list and the example below. This function is mostly for internal use, as the stat.* functions can be supplied directly with the contrasts vector which is one of the main metaseqr arguments.

Usage

1
    make.contrast.list(contrast, sample.list)

Arguments

contrast

a vector of contrasts in the form "ConditionA_vs_ConditionB" or "ConditionA_ vs_ConditionB_vs_ConditionC_vs_...". In case of Control vs Treatment designs, the Control condition should ALWAYS be the first.

sample.list

the list of samples in the experiment. See also the main help page of metaseqr.

Value

A named list whose names are the contrasts and its members are named vectors, where the names are the sample names and the actual vector members are the condition names. See the example.

Author(s)

Panagiotis Moulos

Examples

1
2
3
sample.list <- list(Control=c("C1","C2"),TreatmentA=c("TA1","TA2"),TreatmentB=c("TB1","TB2"))
contrast <- c("Control_vs_TreatmentA","Control_vs_TreatmentA_vs_TreatmentB")
cl <- make.contrast.list(contrast,sample.list)

pmoulos/metaseqR documentation built on Dec. 21, 2020, 6:19 a.m.