fitConstImpulseGene: Fit an impulse and constant model to a single gene

Description Usage Arguments Value Author(s) See Also

View source: R/srcImpulseDE2_fitImpulse.R

Description

[Model fitting function hierarchy: 3 out of 4] This tertiary fitting wrapper calls the optimisation wrappers for the individual fitting operations to be performed on the observations of this gene. Structure of this function:

Usage

1
2
fitConstImpulseGene(vecCounts, scaDisp, vecSizeFactors, vecTimepointsUnique,
  vecidxTimepoint, lsvecidxBatch, boolFitConst, MAXIT = 1000)

Arguments

vecCounts

(numeric vector number of samples) Read count data.

scaDisp

(scalar) Gene-wise negative binomial dispersion hyper-parameter.

vecSizeFactors

(numeric vector number of samples) Model scaling factors for each sample which take sequencing depth into account (size factors).

vecTimepointsUnique

(numeric vector length number of unique timepoints) Vector of unique time coordinates observed in this condition.

vecidxTimepoint

(numeric vector length number of samples) Index of the time coordinates of each sample (reference is vecTimepointsUnique).

lsvecidxBatch

(idx list length number of confounding variables) List of vectors. One vector per confounding variable. Each vector has one entry per sample with the index of the batch ID within the given confounding variable of the given sample. Reference is the list of unique batch ids for each confounding variable.

boolFitConst

(bool) Whether to fit a constant model.

MAXIT

(scalar) [Default 1000] Maximum number of BFGS iterations for model fitting with optim.

Value

(list length 2) Impulse and constant model fit to gene observations.

Author(s)

David Sebastian Fischer

See Also

Called by fitConstImpulseGene to fit constant and impulse model to samples of one condition and one gene. Calls impulse parameter initialisation function estimateImpulseParam and optimisation wrappers fitImpulseModel and fitConstModel.


ImpulseDE2 documentation built on April 28, 2020, 9:19 p.m.