R/runTSCAN.R
plotTSCANDimReduceFeatures.RdA wrapper function which plots all cells or cells in chosen cluster. Each point is a cell colored by the expression of a feature of interest, the relevant edges of the MST are overlaid on top.
plotTSCANDimReduceFeatures(
inSCE,
features,
useReducedDim = "UMAP",
useAssay = "logcounts",
by = "rownames",
useCluster = NULL,
featureDisplay = metadata(inSCE)$featureDisplay,
combinePlot = c("all", "none")
)Input SingleCellExperiment object.
Choose the feature of interest to explore the expression level on the trajectory. Required.
A single character for the matrix of 2D embedding.
Should exist in reducedDims slot. Default "UMAP".
A single character for the feature expression matrix. Should
exist in assayNames(inSCE). Default "logcounts".
Where should features be found? NULL,
"rownames" for rownames(inSCE), otherwise will be regarded as
rowData variable.
Choose specific clusters where gene expression needs to be
visualized. By default NULL, all clusters are chosen.
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.
Must be either "all" or "none". "all"
will combine plots of each feature into a single .ggplot object,
while "none" will output a list of plots. Default "all".
A .ggplot object of cell scatter plot, colored by the
expression of a gene of interest, with the layer of trajectory.
data("mouseBrainSubsetSCE", package = "singleCellTK")
mouseBrainSubsetSCE <- runTSCAN(inSCE = mouseBrainSubsetSCE,
useReducedDim = "PCA_logcounts")
#> Wed Jan 10 17:46:27 2024 ... Running 'scran SNN clustering' with 'louvain' algorithm
#> Wed Jan 10 17:46:27 2024 ... Identified 2 clusters
#> Wed Jan 10 17:46:27 2024 ... Running TSCAN to estimate pseudotime
#> Wed Jan 10 17:46:28 2024 ... Clusters involved in path index 2 are: 1, 2
#> Wed Jan 10 17:46:28 2024 ... Number of estimated paths is 1
plotTSCANDimReduceFeatures(inSCE = mouseBrainSubsetSCE,
features = "Tshz1",
useReducedDim = "TSNE_logcounts")