parseDesignContrast: Parse study design and asked questions encoded in design and...

View source: R/DesignContrast.R

parseDesignContrastR Documentation

Parse study design and asked questions encoded in design and contrast matrices or in one-way ANOVA designs

Description

Parse study design and asked questions encoded in design and contrast matrices or in one-way ANOVA designs

Usage

parseDesignContrast(
  designFile = NULL,
  contrastFile = NULL,
  sampleGroups = NULL,
  groupLevels = NULL,
  dispLevels = NULL,
  contrasts = NULL,
  expSampleNames = NULL
)

Arguments

designFile

A plain tab-delimited file with headers encoding the design matrix, or NULL

contrastFile

A plain tab-delimited file with headers encoding the contrast matrix, or NULL

sampleGroups

A character string concatenated by commas (e.g. A,B,C), or a plain text file containing one string per line (e.g. AnewlineBnewlineC), encoding sample group memberships.

groupLevels

Similar format as 'sampleGroups', encoding levels (e.g. order) of the sampleGroups

dispLevels

Similar format as 'sampleGroups', encoding the display of the groupLevels. Must match 'groupLevels'

contrasts

Similar format as 'sampleGroups', encoding contrasts in case of one-way ANOVA designs

expSampleNames

A vector of character strings giving the expected sample names (e.g. those in the input matrix)

Value

A S4-object 'DesignContrast'

Examples

## one-way ANOVA
parseDesignContrast(sampleGroups="As,Be,As,Be,As,Be",groupLevels="Be,As",
    dispLevels="Beryllium,Arsenic", contrasts="As-Be")
## design/contrast matrix
designFile <- system.file("extdata/example-designMatrix.txt",
    package="ribiosExpression")
contrastFile <- system.file("extdata/example-contrastMatrix.txt",
    package="ribiosExpression")
# minimal information
parseDesignContrast(designFile=designFile, contrastFile=contrastFile)
# with extra information about sample groups
parseDesignContrast(designFile=designFile, contrastFile=contrastFile,
    sampleGroups="As,Be,As,Be,As,Be",
    groupLevels="Be,As", dispLevels="Beryllium,Arsenic")

bedapub/ribiosExpression documentation built on Sept. 2, 2023, 4:37 a.m.