run_umap: Run UMAP on the MOFA factors

Description Usage Arguments Details Value Examples

View source: R/dimensionality_reduction.R

Description

Run UMAP on the MOFA factors

Usage

1
run_umap(object, factors = "all", groups = "all", ...)

Arguments

object

a trained MOFA object.

factors

character vector with the factor names, or numeric vector with the indices of the factors to use, or "all" to plot all factors.

groups

character vector with the groups names, or numeric vector with the indices of the groups of samples to use, or "all" to use samples from all groups.

...

arguments passed to umap

Details

use set.seed before the function call to get reproducible results.

Value

Returns a MOFA object with the dim_red slot filled with the UMAP output

Examples

1
2
3
4
5
6
7
8
9
# Using an existing trained model on simulated data
file <- system.file("extdata", "model.hdf5", package = "MOFA2")
model <- load_model(file)

# Run UMAP
## Not run:  model <- run_umap(model) 

# Change hyperparameters passed to umap
## Not run:  model <- run_umap(model, min_dist = 0.01, n_neighbors = 10) 

MOFA2 documentation built on Nov. 8, 2020, 7:28 p.m.