Begin with the processed and harmonized input data, which contains five columns, sample ID, type, dataset, variable, and value. This data will be used in the MOFA model. Then, go to Jupyter Lab and click on the folder symbol.
Double click on MOFA workflow, followed by scripts and configurations. Open the file 03_MOFA_Configuration.csv. Enter the number of factors to be estimated in the MOFA model, and adjust the values in the file to define whether waiting and scaling should be applied.
Select file and save CSV file from the menu at the top to save the changes. Using the navigation menu on the left side, navigate to the scripts folder by clicking on scripts. Then, open the notebook 03_Run_MOFAipynb.
Click on the Restart Kernel and run all cells button at the top to run the script, and then click restart in the popup. To navigate to the 03_figures folder, double click on figures and then 03_figures. Open the generated plot Figure03_Overview_Variance_Decomposition MOFA result name, and examine the model result.
Go to the navigation menu on the left side. Click on the folder symbol, then double click on input data to navigate to the input data folder. Drag and drop the prepared.
csv containing all the metadata of the samples to be analyzed in association with the generated factors file into the input data folder. Click on the folder symbol. Then, double click on mofa_workflow, followed by scripts and configurations to navigate back to the configurations folder.
Open the file 04_Factor_Analysis_csv. In the numerical variates column, add the names of all numeric columns in the prepared sample metadata CSV file that will be investigated in relation to the MOFA factors separated by commas. In the categorical covariates column, add the names of all categorical columns in the prepared sample metadata CSV file that will be investigated in relation to the MOFA factors, separated by commas.
Save the changes by selecting File and Save CSV file from the menu at the top. Next, click on scripts to navigate to the scripts folder. Double click on the notebook 04_Downstream_Factor_Analysis_ipynb to open it.
To run the script, click on the Restart Kernel and run all sales button at the top, and then click restart in the popup. Use the navigation menu on the left to navigate to the 04_figures folder by double clicking on figures, and then 04_figures. To open the generated plots, double click on them and investigate the factors for interesting patterns and associations.