R/runTSCAN.R
plotTSCANPseudotimeHeatmap.Rd
A wrapper function which visualizes outputs from the
runTSCANDEG
function.
Plots the top genes that increase in expression with increasing pseudotime
along the path in the MST
plotTSCANPseudotimeHeatmap(inSCE, pathIndex, topN = 50)
Input SingleCellExperiment object.
Path number for which the pseudotime values should be used. PathIndex corresponds to one path from the root node to one of the terminal nodes.
An integer. Only to plot this number of top genes along the path
in the MST, in terms of log2FC value. Use NULL
to cancel the top N
subscription. Default 50
.
A plot with the top genes that increase in expression with increasing pseudotime along the path in the MST.
data("scExample", package = "singleCellTK")
sce <- subsetSCECols(sce, colData = "type != 'EmptyDroplet'")
rowData(sce)$Symbol <- rowData(sce)$feature_name
rownames(sce) <- rowData(sce)$Symbol
sce <- scaterlogNormCounts(sce, assayName = "logcounts")
sce <- runDimReduce(inSCE = sce, method = "scaterPCA",
useAssay = "logcounts", reducedDimName = "PCA")
#> Thu Apr 28 11:27:13 2022 ... Computing Scater PCA.
sce <- runDimReduce(inSCE = sce, method = "rTSNE", useReducedDim = "PCA",
reducedDimName = "TSNE")
#> Thu Apr 28 11:27:13 2022 ... Computing RtSNE.
#> Warning: using `useReducedDim`, `run_pca` and `ntop` forced to be FALSE/NULL
sce <- runTSCAN (inSCE = sce, useReducedDim = "PCA", seed = NULL)
#> Thu Apr 28 11:27:14 2022 ... Running 'scran SNN clustering'
#> Cluster involved in path 4 are: 1:5
#> Number of estimated paths is 1
sce <- runTSCANDEG(inSCE = sce, pathIndex = 4)
plotTSCANPseudotimeHeatmap(inSCE = sce, pathIndex = 4,topN = 5)