loadModel {MOFA} | R Documentation |
Method to load a trained MOFA model.
The training of MOFA is done using a Python framework, and the model output
is saved as an .hdf5 file, which has to be loaded in the R package.
loadModel(file, object = NULL, sortFactors = TRUE, minR2 = 0.01)
file |
an hdf5 file saved by the MOFA python framework. |
object |
either NULL (default) or an an existing untrained MOFA object.
If NULL, the |
sortFactors |
boolean indicating whether factors should be sorted by variance explained (default is TRUE) |
minR2 |
minimum R2 threshold to call 'active' factors (default is 0.01). |
a MOFAmodel
model.
# path to the hdf5 file filepath <- system.file("extdata", "CLL_model.hdf5", package = "MOFAdata") # load the model MOFAobject <- loadModel(filepath)