Description Usage Arguments Value Examples
Computation is be done using the embed
package.
1 | compute_umap(df, num_comp = 2, subset = NULL)
|
df |
A data frame. |
num_comp |
A positive integer. The number of UMAP components to compute. |
subset |
A character vector. The subset of columns to use for UMAP
calculation. Default is all columns. Columns in |
A data frame with the UMAP components.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | if (rlang::is_installed("mirmisc")) {
ga_data <- get_ga_data(
log2 = TRUE,
gene_predicate = ~ median(.) > 0
)
genes <- dplyr::intersect(names(ga_data), mirmisc::get_gene_names())
umap <- compute_umap(ga_data, subset = genes)
ggplot2::ggplot(
umap,
ggplot2::aes(umap_1, umap_2, color = meta_collectionga)
) +
ggplot2::geom_point() +
ggplot2::scale_color_viridis_c()
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.