makeCDS: Function to make a compatible data set (CDS) and calculate...

View source: R/makeCDS.r

makeCDSR Documentation

Function to make a compatible data set (CDS) and calculate DESeq2 results.

Description

Function to make a compatible data set (CDS) and calculate DESeq2 results.

Usage

makeCDS(counts, meta, include = NULL, exclude = NULL, foi,
  ftc = NULL, title = NULL, legend = NULL)

Arguments

counts

A count table in which the rows are strains or OTUs and the columns are samples.

meta

A metadata table in which the rows correspond to the columns of the count table.

include

A list that indicates which samples should be included in the analysis, see details.

exclude

A list that indicates which samples should be excluded from the analysis, see details.

foi

The factor of interest that determines how samples will be grouped for comparison.

ftc

The factor to consider separately from the feature of interest, for instance to account for a batch effect.

title

A title for the data set that will carry through to plots.

legend

A vector with the names of the sample groups.

Details

As an alternative to giving both the *counts* and *meta* arguments, you may give a single argument that is a list containing items labelled *counts* and *meta*. The lists for the include and exclude arguments should consist of vectors named to match the columns of the metadata being considered and contain the valid (or invalid) items. For instance: include=list(initial_condition=c("Control","Test"),time=c("t1","t2")). Samples are filtered first by the include list, then the exclude list. You can of course slice the data set in advance according to more complex criteria.

Value

A list containing the original dataset, the DESeq2-analysed dataset and the accompanying results.

Author(s)

Chris Field <fieldc@ethz.ch>

Examples

None

cmfield/phylloR documentation built on Aug. 25, 2023, 10:07 a.m.