Description Usage Arguments Value Author(s) See Also Examples
View source: R/srcLineagePulse_sortGeneTrajectories.R
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.
1 | sortGeneTrajectories(vecIDs, lsMuModel, dirHeatmap = NULL)
|
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. |
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
David Sebastian Fischer
Called by user.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.