Closed jonathanronen closed 5 years ago
Hi, seems to converge properly in my laptop. I have updated minor things in the python package though. Can you install the last version (1.2) and try running again?
After inspecting your model I notice that your CNV is not normalised for library size. Hence you obtain a very strong Factor 1 that just captures the technical variability associated with differences in library size (see figure attached).
plot(
library_size <- apply(model@TrainData$CNVs,2,sum),
getFactors(model, factors=1)[,1]
)
Thanks @rargelaguet. After updating to mofapy 1.2, I get this here error:
Error in py_call_impl(callable, dots$args, dots$keywords): ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
Detailed traceback:
File "/home/jronen/miniconda3/envs/conda36/lib/python3.6/site-packages/mofapy/core/entry_point.py", line 410, in train_model
self.model = runMOFA(self.data, self.data_opts, self.model_opts, self.train_opts, self.train_opts['seed'])
File "/home/jronen/miniconda3/envs/conda36/lib/python3.6/site-packages/mofapy/core/build_model.py", line 143, in runMOFA
net.iterate()
File "/home/jronen/miniconda3/envs/conda36/lib/python3.6/site-packages/mofapy/core/BayesNet.py", line 148, in iterate
self.nodes[node].update()
File "/home/jronen/miniconda3/envs/conda36/lib/python3.6/site-packages/mofapy/core/nodes.py", line 43, in update
self.updateParameters()
File "/home/jronen/miniconda3/envs/conda36/lib/python3.6/site-packages/mofapy/core/updates.py", line 414, in updateParameters
latent_variables = self.getLvIndex() # excluding covariates from the list of latent variables
File "/home/jronen/miniconda3/envs/conda36/lib/python3.6/site-packages/mofapy/core/updates.py", line 403, in getLvIndex
if any(self.covariates):
Traceback:
1. runMOFA(MOFAobject, outfile = tempfile())
2. mofa_entrypoint$train_model()
3. py_call_impl(callable, dots$args, dots$keywords)
Any ideas?
J.
This is an error from the 1.1 version, fixed in https://github.com/bioFAM/MOFA/issues/26 Are you sure that you are using the 1.2 version?
You know what, I installed a new python 3.6.8, new R 3.5.2, and everything anew and now it works. Thanks @rargelaguet!
J.
PS thanks for the tip on the CNV normalization!
Hi. I'm encountering strange errors with data which used to work for me on a previous version of MOFA. Could you please help debug?
Error message:
The MOFA object looks like this: mofa object rds file
session info:
mofapy version 1.1.1 on python 3.6.7.
Thank you! J.