FitKinetics {grandR} | R Documentation |
Fit kinetic models to all genes.
Description
Fit the standard mass action kinetics model of gene expression by different methods. Some methods require steady state assumptions, for others data must be properly normalized. The parameters are fit per Condition.
Usage
FitKinetics(
data,
name.prefix = "kinetics",
type = c("nlls", "ntr", "lm", "chase"),
slot = DefaultSlot(data),
time = Design$dur.4sU,
CI.size = 0.95,
return.fields = c("Synthesis", "Half-life"),
return.extra = NULL,
...
)
Arguments
data |
A grandR object |
name.prefix |
the prefix of the analysis name to be stored in the grandR object |
type |
Which method to use (either one of "full","ntr","lm", "chase") |
slot |
The data slot to take expression values from |
time |
The column in the column annotation table representing the labeling duration |
CI.size |
A number between 0 and 1 representing the size of the confidence interval |
return.fields |
which statistics to return (see details) |
return.extra |
additional statistics to return (see details) |
... |
forwarded to |
Details
The start of labeling for all samples should be the same experimental time point. The fit gets more precise with multiple samples from multiple labeling durations.
The standard mass action kinetics model of gene expression arises from the following differential equation:
df/dt = s - d f(t)
This model assumes constant synthesis and degradation rates. Based on this, there are different ways for fitting the parameters:
FitKineticsGeneLeastSquares: non-linear least squares fit on the full model; depends on proper normalization; can work without steady state; assumption of homoscedastic gaussian errors is theoretically not justified
FitKineticsGeneLogSpaceLinear: linear model fit on the old RNA; depends on proper normalization; assumes steady state for estimating the synthesis rate; assumption of homoscedastic gaussian errors in log space is problematic and theoretically not justified
FitKineticsGeneNtr: maximum a posteriori fit on the NTR posterior transformed to the degradation rate; as it is based on the NTR only, it is independent on proper normalization; assumes steady state; theoretically well justified
Pulse-chase designs are fit using FitKineticsGeneLeastSquares while only considering the drop of labeled RNA. Note that in this case the notion "new" / "old" RNA is misleading, since labeled RNA corresponds to pre-existing RNA!
This function is flexible in what to put in the analysis table. You can specify the statistics using return.fields and return.extra (see kinetics2vector
)
Value
A new grandR object with the fitted parameters as an analysis table
See Also
FitKineticsGeneNtr, FitKineticsGeneLeastSquares, FitKineticsGeneLogSpaceLinear
Examples
sars <- ReadGRAND(system.file("extdata", "sars.tsv.gz", package = "grandR"),
design=c("Cell",Design$dur.4sU,Design$Replicate))
sars <- FilterGenes(sars,use=1:10)
sars<-FitKinetics(sars,name="kinetics.ntr",type='ntr')
sars<-Normalize(sars)
sars<-FitKinetics(sars,name="kinetics.nlls",type='nlls')
sars<-FitKinetics(sars,name="kinetics.lm",type='lm')
head(GetAnalysisTable(sars,columns="Half-life"))