gemini_calculate_lfc {gemini} | R Documentation

## Calculate log-fold change

### Description

Given a gemini.input object, calculates log-fold change from `counts`.

### Usage

    gemini_calculate_lfc(Input, counts = "counts", sample.column.name = "samplename",
    normalize = TRUE, CONSTANT = 32)

### Arguments

`Input` | a gemini.input object containing an object named `counts`.
`counts` | a character indicating the name of a matrix of counts within `Input` that can be used to calculate log-fold changes (defaults to "counts").
`sample.column.name` | a character or integer indicating which column of `Input$replicate.map` describes the samples.
`normalize` | a logical indicating if counts should be median-normalized, see Details (default = TRUE)
`CONSTANT` | a numeric indicating a constant value that shifts counts to reduce outliers, see Details (default = 32).

### Details

See Methods from Zamanighomi et al. 2019 for a comprehensive description of the calculation of log-fold change, normalization, and count processing.

If multiple early time-points are provided for a given sample, they are treated as replicates and averaged, and used to compute log-fold change against any specified late time points.

If a sample has a specific early-time point, these are matched as long as the sample names are identical between the early and late timepoints in `sample.column.name`

### Value

a gemini object identical to `Input` that also contains new objects called `LFC` and `sample.annot`.

### Examples

    data("Input", package = "gemini")
    Input <- gemini_calculate_lfc(Input)

    head(Input$LFC)

[Package gemini version 1.1.0 Index]