View source: R/dimensionality_reduction.R
tof_reduce_dimensions | R Documentation |
This function is a wrapper around tidytof's tof_reduce_* function family. It performs dimensionality reduction on single-cell data using a user-specified method (of 3 choices) and each method's corresponding input parameters
tof_reduce_dimensions(
tof_tibble,
...,
augment = TRUE,
method = c("pca", "tsne", "umap")
)
tof_tibble |
A 'tof_tbl' or 'tibble'. |
... |
Arguments to be passed to the tof_reduce_* function corresponding to
the embedding method. See |
augment |
A boolean value indicating if the output should column-bind the dimensionality-reduced embedding vectors of each cell as a new column in 'tof_tibble' (TRUE, the default) or if a tibble including only the low-dimensionality embeddings should be returned (FALSE). |
method |
A method of dimensionality reduction. Currently, PCA, tSNE, and UMAP embedding are supported. |
A tibble with the same number of rows as 'tof_tibble', each representing a single cell. Each of the ‘num_comp' columns represents each cell’s embedding in the calculated embedding space.
Other dimensionality reduction functions:
tof_reduce_pca()
,
tof_reduce_tsne()
,
tof_reduce_umap()
# simulate single-cell data
sim_data <-
dplyr::tibble(
cd45 = rnorm(n = 100),
cd38 = rnorm(n = 100),
cd34 = rnorm(n = 100),
cd19 = rnorm(n = 100)
)
# calculate pca
tof_reduce_dimensions(tof_tibble = sim_data, method = "pca")
# calculate tsne
tof_reduce_dimensions(tof_tibble = sim_data, method = "tsne")
# calculate umap
tof_reduce_dimensions(tof_tibble = sim_data, method = "umap")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.