log2FC {SEtools}R Documentation

log2FC

Description

Generates log2(foldchange) matrix/assay

Usage

log2FC(x, fromAssay = NULL, controls, by = NULL, isLog = NULL)

Arguments

x

A numeric matrix, or a 'SummarizedExperiment' object

fromAssay

The assay to use if 'x' is a 'SummarizedExperiment'

controls

A vector of which samples should be used as controls for foldchange calculations.

by

An optional vector indicating groups/batches by which the controls will be averaged to calculate per-group foldchanges.

isLog

Logical; whether the data is log-transformed. If NULL, will attempt to figure it out from the data and/or assay name

Value

An object of same class as 'x'; if a 'SummarizedExperiment', will have the additional assay 'log2FC'.

Examples

log2FC( matrix(rnorm(40), ncol=4), controls=1:2 )


[Package SEtools version 1.0.0 Index]