quickPseudotime {scran} | R Documentation |
A convenience wrapper to quickly compute a minimum spanning tree (MST) on the cluster centroids to obtain a pseudotime ordering of the cells. This function is now deprecated as it has been moved to the TSCAN package itself.
quickPseudotime( x, clusters, use = 1, outgroup = FALSE, outscale = 3, start = NULL )
x |
A named list of numeric matrices containing dimensionality reduction results.
All matrices should have the same number of cells, i.e., rows.
Alternatively, a SingleCellExperiment containing such results in its |
clusters |
A factor of length equal to the number of cells in |
use |
Integer scalar or string specifying the entry of |
outgroup, outscale |
Arguments passed to |
start |
Arguments passed to |
This function simply calls, in order:
rowsum
, to compute the average low-dimensional coordinates for each cluster.
createClusterMST
on the average coordinates specified by use
.
orderClusterMST
on the average and per-cell coordinates specified by use
.
connectClusterMST
on the average coordinates for all entries of x
.
A List containing:
centered
, a list of numeric matrices containing the averaged coordinates for each cluster.
Each matrix corresponds to a dimensionality reduction result in x
.
mst
, a graph object containing the cluster-level MST computed on the coordinates from use
.
ordering
, a numeric matrix of pseudotimes for various paths through the MST computed from use
.
connected
, a list of data.frames containing the edge coordinates between centers.
Each data.frame corresponds to a dimensionality reduction result in x
.
Aaron Lun
createClusterMST
and friends, for the functions that do the actual work.
# Mocking up some data: library(scuttle) sce <- mockSCE(ncells=500) sce <- logNormCounts(sce) sce <- scater::runPCA(sce) clusters <- clusterSNNGraph(sce, use.dimred="PCA") # Quickly computing the pseudotime: out <- quickPseudotime(sce, clusters, use="PCA") out$mst head(out$ordering)