inferParameters: Infer Parameters from Read Data

Description Usage Arguments Examples

Description

Infers alpha (synthesis rate) and beta (degredation rate) from sequencing read data (stored in the data slot) using the basic kinetic model: dx/dt = alpha - beta * x.

If no read data exists in the provided basicKineticModel then simulated read data will be generated using simulation data stored in @simData before parameter inference. If no simulated data exists, it will be generated before simulating read data and inferring parameters.

Usage

1
2
3
## S4 method for signature 'basicKineticModel'
inferParameters(object, dispersionModel = NULL,
  dispByGene = T)

Arguments

object

A basicKineticModel object

dispersionModel

A disperson model to use for inference. If not specified, the dispersion model stored in object will be used instead. Must be specified as a function of the gene being analized if dispByGene = TRUE or as a function of the mean of the distribution if dispByGene = FALSE. See the return values of estimateDispersions for examples of these two kinds of functions.

dispByGene

Boolean controlling the expected nature of the dispersionModel. See dispersionModel description for more details.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
##setup
bkm=basicKineticModel(times=0:30, synthRate = 1:10,degRate = rep(0.3,10))
bkm=simulateData(bkm) #optional
bkm=simulateReads(bkm,expectedLibSize=10^6,replicates=3,spikeInSizes = 200,dispersionModel=function(x){rep(10^3,length(x))}, dispByGene=F)

##infer params using same dispersion as simulated data
bkm=inferParameters(bkm,byGene=F)

##infer params using per-gene dispersion estimates from read data (dispersion estimates for each gene based on that gene's data alone)
bkm@dispersionModel = estimateDispersions(bkm,byGene=T)
bkm=inferParameters(bkm)

##infer params using mean-based dispersion estimates from read data (dispersion estimates based on entire data set)
bkm@dispersionModel = estimateDispersions(bkm,byGene=F)
bkm=inferParameters(bkm,byGene=F)

ndukler/tkSim documentation built on May 16, 2019, 8:12 p.m.