Run PHATE (Potential of Heat-diffusion for Affinity-based Trajectory Embedding)
Source:R/RunPHATE.R
RunPHATE.RdRun PHATE (Potential of Heat-diffusion for Affinity-based Trajectory Embedding)
Usage
RunPHATE(object, ...)
# S3 method for class 'Seurat'
RunPHATE(
object,
reduction = "pca",
dims = NULL,
features = NULL,
assay = NULL,
layer = "data",
n_components = 2,
knn = 5,
decay = 40,
n_landmark = 2000,
t = "auto",
gamma = 1,
n_pca = 100,
knn_dist = "euclidean",
knn_max = NULL,
t_max = 100,
do_cluster = FALSE,
n_clusters = "auto",
max_clusters = 100,
reduction.name = "phate",
reduction.key = "PHATE_",
verbose = TRUE,
seed.use = 11,
...
)
# Default S3 method
RunPHATE(
object,
assay = NULL,
n_components = 2,
knn = 5,
decay = 40,
n_landmark = 2000,
t = "auto",
gamma = 1,
n_pca = 100,
knn_dist = "euclidean",
knn_max = NULL,
t_max = 100,
do_cluster = FALSE,
n_clusters = "auto",
max_clusters = 100,
reduction.key = "PHATE_",
verbose = TRUE,
seed.use = 11,
...
)Arguments
- object
An object. This can be a Seurat object or a matrix-like object.
- ...
Additional arguments to be passed to phate.PHATE.
- reduction
The reduction to be used. Default is
"pca".- dims
The dimensions to be used. Default is
NULL.- features
The features to be used. Default is
NULL.- assay
The assay to be used. Default is
NULL.- layer
The layer to be used. Default is
"data".- n_components
The number of PHATE components. Default is
2.- knn
A number of nearest neighbors on which to build kernel. Default is
5.- decay
The sets decay rate of kernel tails. Default is
40.- n_landmark
A number of landmarks to use in fast PHATE. Default is
2000.- t
The power to which the diffusion operator is powered. This sets the level of diffusion. If
"auto",tis selected according to the knee point in the Von Neumann Entropy of the diffusion operator. Default is"auto".- gamma
The informational distance constant between
-1and1.gamma=1gives the PHATE log potential,gamma=0gives a square root potential. Default is1.- n_pca
A number of principal components to use for calculating neighborhoods. For extremely large datasets, using
n_pca < 20allows neighborhoods to be calculated in roughlylog(n_samples)time. Default is100.- knn_dist
The distance metric for k-nearest neighbors. Recommended values:
"euclidean","cosine","precomputed". Default is"euclidean".- knn_max
The maximum number of neighbors for which alpha decaying kernel is computed for each point. For very large datasets, setting
knn_maxto a small multiple ofknncan speed up computation significantly. Default isNULL.- t_max
The maximum
tto test. Default is100.- do_cluster
Whether to perform clustering on the PHATE embeddings. Default is
FALSE.- n_clusters
A number of clusters to be identified. Default is
"auto".- max_clusters
The maximum number of clusters to test. Default is
100.- reduction.name
The name of the reduction to be stored in the Seurat object. Default is
"phate".- reduction.key
The prefix for the column names of the PHATE embeddings. Default is
"PHATE_".- verbose
Whether to print the message. Default is
TRUE.- seed.use
The random seed to be used. Default is
11.
Examples
if (FALSE) { # \dontrun{
data(pancreas_sub)
pancreas_sub <- standard_scop(pancreas_sub)
pancreas_sub <- RunPHATE(
object = pancreas_sub,
features = SeuratObject::VariableFeatures(pancreas_sub)
)
CellDimPlot(
pancreas_sub,
group.by = "CellType",
reduction = "phate"
)
} # }