create_mofa: create a MOFA object

View source: R/create_mofa.R

create_mofaR Documentation

create a MOFA object

Description

Method to create a MOFA object. Depending on the input data format, this method calls one of the following functions:

  • long data.frame: create_mofa_from_df

  • List of matrices: create_mofa_from_matrix

  • MultiAssayExperiment: create_mofa_from_MultiAssayExperiment

  • Seurat: create_mofa_from_Seurat

  • SingleCellExperiment: create_mofa_from_SingleCellExperiment

Please read the documentation of the corresponding function for more details on your specific data format.

Usage

create_mofa(data, groups = NULL, extract_metadata = TRUE, ...)

Arguments

data

one of the formats above

groups

group information, only relevant when using the multi-group framework.

extract_metadata

logical indicating whether to incorporate the sample metadata from the input object into the MOFA object ( not relevant when the input is a list of matrices). Default is TRUE.

...

further arguments that can be passed to the function depending on the inout data format. See the dpcumentation of above functions for details.

Value

Returns an untrained MOFA object

Examples

# Using an existing simulated data with two groups and two views
file <- system.file("extdata", "test_data.RData", package = "MOFA2")

# Load data (in long data.frame format)
load(file) 
MOFAmodel <- create_mofa(dt)

bioFAM/MOFA2 documentation built on June 12, 2024, 3:57 p.m.