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")
#> Sat Mar 18 10:30:11 2023 ... Running 'scran SNN clustering' with 'louvain' algorithm
#> Sat Mar 18 10:30:12 2023 ... Identified 2 clusters
#> Sat Mar 18 10:30:12 2023 ... Running TSCAN to estimate pseudotime
#> Sat Mar 18 10:30:12 2023 ... Clusters involved in path index 2 are: 1, 2
#> Sat Mar 18 10:30:12 2023 ... Number of estimated paths is 1
plotTSCANDimReduceFeatures(inSCE = mouseBrainSubsetSCE,
features = "Tshz1",
useReducedDim = "TSNE_logcounts")