run_mofa {MOFA2} | R Documentation |
Function to train an untrained MOFA
object.
run_mofa(object, outfile = NULL, save_data = TRUE, use_basilisk = FALSE)
object |
an untrained |
outfile |
output file for the model (.hdf5 format). If |
save_data |
logical indicating whether to save the training data in the hdf5 file.
This is useful for some downstream analysis (mainly functions with the prefix |
use_basilisk |
use |
This function is called once a MOFA object has been prepared (using prepare_mofa
)
In this step the R package calls the mofapy2
Python package, where model training is performed.
The interface with Python is done with the reticulate
package.
If you have several versions of Python installed and R is not detecting the correct one,
you can change it using reticulate::use_python
when loading the R session.
Alternatively, you can let us install mofapy2 for you using basilisk
if you set use_basilisk to TRUE
a trained MOFA
object
# Load data (in data.frame format) file <- system.file("extdata", "test_data.RData", package = "MOFA2") load(file) # Create the MOFA object MOFAmodel <- create_mofa(dt) # Prepare the MOFA object with default options MOFAmodel <- prepare_mofa(MOFAmodel) # Run the MOFA model ## Not run: MOFAmodel <- run_mofa(MOFAmodel, use_basilisk = TRUE)