cantinilab / momix-notebook

GNU General Public License v3.0
61 stars 11 forks source link

MOFA error #5

Closed tuhulab closed 3 years ago

tuhulab commented 3 years ago

When I run momix-notebook/scripts/Comparison in simulated data.ipynb, ## Running the comparisons. I got the error message as shown below. Could the error be related to depreciated MOFA v1?

Warning message in createMOFAobject(omics): “View names are not specified in the data, renaming them to: view_1, view_2, view_3 ” Creating MOFA object from list of matrices, please make sure that samples are columns and features are rows...

Checking data options...

Checking training options...

Checking model options...

[1] "No output file provided, using a temporary file..." Error in py_module_import(module, convert = convert): ModuleNotFoundError: No module named 'mofa' Traceback:

  1. runfactorization(simul_folder, paste0("omics", 1:3, ".txt"), . num.clusters, sep = "\t", filtering = "none")
  2. runMOFA(MOFAobject)
  3. import("mofa")
  4. py_module_import(module, convert = convert)
lcan88 commented 3 years ago

It should not be connected to that, we created the conda package and no modification has been done on that. The system cannot find the MOFA library. Did you first install the conda environment and run the notebook with the environment activated?

tuhulab commented 3 years ago

Screenshot 2021-02-16 at 13 18 38

Yes, I've been following all the procedures. Strangely, I can see activated mofa in my conda environment.

lcan88 commented 3 years ago

ok! MOFA cannot find the correct python version. You should add in the beginning of the runfactorization.R file the following two lines:

library(reticulate) use_python("path to miconda3/miniconda3/envs/momix/bin/python3.6", required=TRUE)

tuhulab commented 3 years ago

Thx, @lcan88 . It's working perfectly now!