quickPseudotime {scran} | R Documentation

## Quick MST-based pseudotime

### Description

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.

### Usage

    quickPseudotime(
      x,
      clusters,
      use = 1,
      outgroup = FALSE,
      outscale = 3,
      start = NULL
    )

### Arguments

`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 `reducedDims`.
`clusters` | A factor of length equal to the number of cells in `x`, specifying the cluster assignment for each cell.
`use` | Integer scalar or string specifying the entry of `x` to use for MST construction and pseudotime calculations.
`outgroup, outscale` | Arguments passed to `createClusterMST`.
`start` | Arguments passed to `orderClusterMST`.

### Details

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`.

### Value

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`.

### Author(s)

Aaron Lun

### See Also

`createClusterMST` and friends, for the functions that do the actual work.

### Examples

    # 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)

[Package scran version 1.18.7 Index]