R/runTSCAN.R
plotTSCANPseudotimeGenes.Rd
A wrapper function which visualizes outputs from the
runTSCANDEG
function. Plots the genes that increase or decrease
in expression with increasing pseudotime along the path in the MST.
runTSCANDEG
has to be run in advance with using the same
pathIndex
of interest.
plotTSCANPseudotimeGenes(
inSCE,
pathIndex,
direction = c("increasing", "decreasing"),
topN = 10,
useAssay = NULL,
featureDisplay = metadata(inSCE)$featureDisplay
)
Input SingleCellExperiment object.
Path index for which the pseudotime values should be used.
Should have being used in runTSCANDEG
.
Should we show features with expression increasing or
decreeasing along the increase in TSCAN pseudotime? Choices are
"increasing"
or "decreasing"
.
An integer. Only to plot this number of top genes that are increasing/decreasing in expression with increasing pseudotime along the path in the MST. Default 10
A single character to specify a feature expression matrix in
assays
slot. The expression of top features from here will be
visualized. Default NULL
use the one used for
runTSCANDEG
.
Specify the feature ID type to display. Users can set
default value with setSCTKDisplayRow
. NULL
or
"rownames"
specifies the rownames of inSCE
. Other character
values indicates rowData
variable.
A .ggplot
object with the facets of the top genes. Expression
on y-axis, pseudotime on x-axis.
data("mouseBrainSubsetSCE", package = "singleCellTK")
mouseBrainSubsetSCE <- runTSCAN(inSCE = mouseBrainSubsetSCE,
useReducedDim = "PCA_logcounts")
#> Mon Dec 19 18:08:43 2022 ... Running 'scran SNN clustering' with 'louvain' algorithm
#> Mon Dec 19 18:08:44 2022 ... Identified 2 clusters
#> Mon Dec 19 18:08:44 2022 ... Running TSCAN to estimate pseudotime
#> Mon Dec 19 18:08:44 2022 ... Clusters involved in path index 2 are: 1, 2
#> Mon Dec 19 18:08:44 2022 ... Number of estimated paths is 1
terminalNodes <- listTSCANTerminalNodes(mouseBrainSubsetSCE)
mouseBrainSubsetSCE <- runTSCANDEG(inSCE = mouseBrainSubsetSCE,
pathIndex = terminalNodes[1])
plotTSCANPseudotimeGenes(mouseBrainSubsetSCE,
pathIndex = terminalNodes[1],
useAssay = "logcounts")