fitSigmoidModels: Fits sigmoidal models to all genes on all all samples of a...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/srcImpulseDE2_fitSigmoid.R

Description

[Model fitting function hierarchy: 1 out of 3] This primary fitting wrapper performs parralelisation of model fitting across genes.

Usage

1
fitSigmoidModels(objectImpulseDE2, vecConfounders, strCondition)

Arguments

objectImpulseDE2

(object class ImpulseDE2Object) Object to be fit with sigmoidal model. Needs to be fitted with impulse model before.

vecConfounders

(vector of strings number of confounding variables) Factors to correct for during batch correction. Names refer to columns in dfAnnotation.

strCondition

(str) Name of condition entry in lsModelFits for which sigmoidal models are to be fit to each gene.

Value

objectImpulseDE2 (object class ImpulseDE2Object) Object with sigmoidal fit added: objectImpulseDE2@lsModelFits is updated to: lsModelFits (list length number of conditions fit (1 or 3) +1) {'case'} or {'case', 'control', 'combined'} This is the lsModelFits object handed to this function with additional sigmoid fit entries for every gene for the given condition. One model fitting object for each condition: In case-only DE analysis, only the condition {'case'} is fit. In case-control DE analysis, the conditions {'case', 'control','combined} are fit. Each condition entry is a list of model fits for each gene. Each gene entry is a list of model fits to the individual models: Impulse model, constant model and sigmoidal fit. Each model fit per gene is a list of fitting parameters and results.

Author(s)

David Sebastian Fischer

See Also

Calls fitSigmoidGene to perform fitting on each gene.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
lsSimulatedData <- simulateDataSetImpulseDE2(
vecTimePointsA   = rep(seq(1,8),3),
vecTimePointsB   = NULL,
vecBatchesA      = NULL,
vecBatchesB      = NULL,
scaNConst        = 0,
scaNImp          = 20,
scaNLin          = 10,
scaNSig          = 20)
objectImpulseDE2 <- runImpulseDE2(
matCountData    = lsSimulatedData$matObservedCounts, 
dfAnnotation    = lsSimulatedData$dfAnnotation,
boolCaseCtrl    = FALSE,
vecConfounders  = NULL,
boolIdentifyTransients = FALSE,
scaNProc        = 1 )
# You could have used boolIdentifyTransients=TRUE
# to avoid the following post wrapper fitting.
objectImpulseDE2 <- fitSigmoidModels(
objectImpulseDE2 = objectImpulseDE2,
vecConfounders   = NULL,
strCondition     = 'case')
objectImpulseDE2 <- updateDEAnalysis(
objectImpulseDE2=objectImpulseDE2,
scaQThresTransients=0.001)
head(objectImpulseDE2$dfImpulseDE2Results)
# dfImpulseDE2Results now contain 'transients-analysis'.

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