updateDEAnalysis: Update dfImpulseDE2Results after sigmoids have been fit...

View source: R/srcImpulseDE2_runDEAnalysis.R

updateDEAnalysisR Documentation

Update dfImpulseDE2Results after sigmoids have been fit through external call

Description

This is a userfriendly wrapper of runDEAnalysis for this update scenario.

Usage

updateDEAnalysis(objectImpulseDE2, scaQThresTransients = 0.001)

Arguments

objectImpulseDE2

(object class ImpulseDE2Object) Object containing fits to be evaluated.

scaQThresTransients

(scalar) [Default 0.001] FDR-corrected p-value threshold for hypothesis tests between impulse, sigmoidal and constant model used to identify transiently regulated genes.

Value

objectImpulseDE2 (ImpulseDE2Object) Input object with dfDEAnalysis updated to: dfDEAnalysis (data frame samples x reported characteristics) Summary of fitting procedure and differential expression results for each gene.

  • Gene: Gene ID.

  • p: P-value for differential expression.

  • padj: Benjamini-Hochberg false-discovery rate corrected p-value for differential expression analysis.

  • loglik_full: Loglikelihood of full model.

  • loglik_red: Loglikelihood of reduced model.

  • df_full: Degrees of freedom of full model.

  • df_red: Degrees of freedom of reduced model

  • mean: Inferred mean parameter of constant model of first batch. From combined samples in case-ctrl.

  • allZero (bool) Whether there were no observed non-zero observations of this gene. If TRUE, fitting and DE analsysis were skipped and entry is NA.

Entries only present in case-only DE analysis:

  • converge_impulse: Convergence status of optim for impulse model fit (full model).

  • converge_const: Convergence status of optim for constant model fit (reduced model).

Entries only present in case-control DE analysis:

  • converge_combined: Convergence status of optim for impulse model fit to case and control samples combined (reduced model).

  • converge_case: Convergence status of optim for impulse model fit to samples of case condition (full model 1/2).

  • converge_control: Convergence status of optim for impulse model fit to samples of control condition (full model 2/2).

Entries only present if boolIdentifyTransients is TRUE:

  • converge_sigmoid: Convergence status of optim for sigmoid model fit to samples of case condition.

  • impulseTOsigmoid_p: P-value of loglikelihood ratio test impulse model fit versus sigmoidal model on samples of case condition.

  • impulseTOsigmoid_padj: Benjamini-Hochberg false-discovery rate corrected p-value of loglikelihood ratio test impulse model fit versus sigmoid model on samples of case condition.

  • sigmoidTOconst_p: P-value of loglikelihood ratio test sigmoidal model fit versus constant model on samples of case condition.

  • sigmoidTOconst_padj: Benjamini-Hochberg false-discovery rate corrected p-value of loglikelihood ratio test sigmoidal model fit versus constant model on samples of case condition.

  • isTransient (bool) Whether gene is transiently activated or deactivated and differentially expressed.

  • isMonotonous (bool) Whether gene is not transiently activated or deactivated and differentially expressed. This scenario corresponds to a montonous expression level increase or decrease.

Author(s)

David Sebastian Fischer

See Also

Called by separately by user.

Examples

lsSimulatedData <- simulateDataSetImpulseDE2(
vecTimePointsA   = rep(seq(1,8),3),
vecTimePointsB   = NULL,
vecBatchesA      = NULL,
vecBatchesB      = NULL,
scaNConst        = 0,
scaNImp          = 50,
scaNLin          = 0,
scaNSig          = 50)
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'.


YosefLab/ImpulseDE2 documentation built on Sept. 17, 2022, 2:45 a.m.