tidyContrasts: Function tidyContrasts

Description Usage Arguments Details Value Author(s) Examples

View source: R/tidyContrasts.R

Description

Takes a DGEobj or contrast list as input and merges them into one tidy dataframe. A contrast list is simply a list of topTable contrast dataframes. For example, DGEobj::getType(mydgeobj, "topTable") would retrieve a list of contrasts from a DGEobj. The contrast list must be a named list as the contrast names are used during the merge operation.

Usage

1
tidyContrasts(x, rownameColumn = "rownames", includeColumns)

Arguments

x

A DGEobj or named list of contrast dataframes (required).

rownameColumn

Name of the rowname column. If a column by this name does not exist, it is created from the rownames property (rownames_to_column(var=rownameColumn))

includeColumns

A character vector of columns to include in the output (default = colnames of the first contrast)

Details

The input may or may not have rownames. If supplied rownameColumn does not exist as a colname in the dataframes, it is created from the rownames. In tidy style, the output will have no rownames.

The contrast names will be used as a new column in the tidy output format.

Value

A DF with merged contrast data.

Author(s)

John Thompson, john.thompson@bms.com

Examples

1
2
3
4
5
6
  #Get contrasts directly from a DGEobj
  MyMergedTidyDF <- tidyContrasts (myDgeObj)

  #Assemble a list of contrasts from two DGEobjs; just logFC and conf intervals
  myContrasts <- c(getType(DGEobj1, "topTable"), getType(DEobj2, "topTable"))
  MyMergedTidyDF <- tidyContrasts (myContrasts, includeColumns = c("logFC", "CI.R", "CI.L"))

jrthompson54/DGE.Tools2 documentation built on May 12, 2021, 8:47 p.m.