load_specs: Adjust a confounded batch effect

View source: R/rnaseq.r

load_specsR Documentation

Adjust a confounded batch effect

Description

Adjust a nested batch effect

Usage

load_specs(file = "", context)

Arguments

inner

A factor representing the variable to be recoded, e.g. the cell-line

...

The parent factors that 'inner' is inside, e.g. the genotype of the cell-line

Details

When one covariate entirely predicts another, then including both in a linear model will result in an unspecified model. This can happen if we have e.g. groups of cell-lines that represent a genotype. If each of those cell-lines receives a treatment, then we need both the group-level information to test the interesting treatment x genotype interaction, but also the cell-line information to remove any batch effect they represent. To achieve this, we can recode the batch effect so that each genotype has a common set of levels, and then we can include that batch effect in interaction with the grouping factor.

If one group has a larger number of sub-treatments, then it will be necessary to remove the columns of the design matrix that are all zero separately

Value

A recoded factor that can now replace the inner (cell-line) variable in your model

Author(s)

Gavin Kelly


FrancisCrickInstitute/DESdemonA documentation built on Jan. 2, 2023, 8:08 p.m.