getFinalModel: Fit final model

Description Usage Arguments Details Value See Also

Description

Fit the final Negative Binomial GLM, taking into account batch effects and final dispersion estimates.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
getFinalModel(x, ...)

## Default S3 method:
getFinalModel(x, ...)

## S3 method for class 'concensusWorkflow'
getFinalModel(x, ...)

## S3 method for class 'concensusDataSet'
getFinalModel(x, conditions = c("compound",
  "concentration"), grouping = "strain", ...)

Arguments

x

concensusWorkflow or concensusDataSet.

...

Other arguments.

conditions

Character vector. Columns in the data attribute of concensusDataSet which together identify groups of replicates of the same condition.

grouping

Character vector. Columns in the data attribute of concensusDataSet which together identify analytically independent chunks of data, e.g. strains.

Details

Using predicted_null_count column in the data attribute of concensusDataSet is added to the GLM as an offset. A new column, condition_group is created as a concatenation of the combinations of values encountered in the columns specified in conditions, which is used as a catagorical variable.

The condition_group associated with the negative control is identified, and set as the reference. A Negative Binomial GLM is fitted using no intercept, predicted_null_count as an offset, condition_group as a predictor. The count column is the response variable.

Since a log link is used, and predicted_null_count is estimated from native control batch effects, the extracted coefficient estimates can be intreprested as log(fold change) realtive to the negative control.

Value

concensusWorkflow or concensusDataSet with a new model_parameters attribute containing effect sizes (LFC) and p-values.

See Also

glm


eachanjohnson/concensusGLM documentation built on June 26, 2019, 2:26 a.m.