sortGeneTrajectories: Cluster expression mean trajectories

Description Usage Arguments Value Author(s) See Also Examples

View source: R/srcLineagePulse_sortGeneTrajectories.R

Description

Sorts inferred gene trajectories by peak time in continuous covariate. Optional: Can create a heatmap of the gene trajectories sorted according to peak time. The heatmap is based on z-scores.

Usage

1
sortGeneTrajectories(vecIDs, lsMuModel, dirHeatmap = NULL)

Arguments

vecIDs

(vector of strings) Names of genes to cluster.

lsMuModel

(list) Object containing description of gene-wise mean parameter models.

dirHeatmap

(str directory) [Default NULL] Directory to which heatmap is saved to. Return heatmap object if NULL.

Value

list (length 3) If dirHeatmap is not NULL, only vecSortedGenes is returned and the two heatmaps are printed to pdfs in the directory dirHeatmap. vecSortedGenes: (string vector number of IDs) hmGeneSorted: genes sorted by peak time in continuous covariate hmGeneClusters: genes sorted by clustering

Author(s)

David Sebastian Fischer

See Also

Called by user.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
lsSimulatedData <- simulateContinuousDataSet(
    scaNCells = 100,
    scaNConst = 10,
    scaNLin = 10,
    scaNImp = 10,
    scaMumax = 100,
    scaSDMuAmplitude = 3,
    vecNormConstExternal=NULL,
    vecDispExternal=rep(20, 30),
    vecGeneWiseDropoutRates = rep(0.1, 30))
matDropoutPredictors <- as.matrix(data.frame(
    log_means = log(rowMeans(lsSimulatedData$counts)+1) ))
objLP <- runLineagePulse(
    counts = lsSimulatedData$counts,
    dfAnnotation = lsSimulatedData$annot,
    strMuModel = "splines", scaDFSplinesMu = 6,
    strDropModel="logistic", 
    matPiConstPredictors = matDropoutPredictors)
lsHeatmaps <- sortGeneTrajectories(
    vecIDs = objLP$dfResults[which(objLP$dfResults$padj < 0.01),]$gene,
    lsMuModel = lsMuModelH1(objLP),
    dirHeatmap = NULL)
#print(lsHeatmaps$hmGeneSorted)

LineagePulse documentation built on Nov. 8, 2020, 7:01 p.m.