Closed CarlBrunius closed 5 years ago
Hi Carl, Thanks for the feedback.
I uploaded the python package to pypi so it should be easier to install by pip install mofapy
. I will update the README file now. Can you try if it works?
The error is a bug I actually introduced 30min ago. Can you pull the last commit and install again the R package?
Thanks!
Hi, thx!
Terminal output from PyPI installation:
emp-235-92:~ carlbru$ pip install mofapy
Requirement already satisfied: mofapy in ./Library/Python/2.7/lib/python/site-packages (1.0)
Requirement already satisfied: pandas in ./Library/Python/2.7/lib/python/site-packages (from mofapy) (0.23.4)
Requirement already satisfied: scipy in ./Library/Python/2.7/lib/python/site-packages (from mofapy) (1.2.0)
Requirement already satisfied: numpy in ./Library/Python/2.7/lib/python/site-packages (from mofapy) (1.16.0)
Requirement already satisfied: sklearn in ./Library/Python/2.7/lib/python/site-packages (from mofapy) (0.0)
Requirement already satisfied: argparse in ./Library/Python/2.7/lib/python/site-packages (from mofapy) (1.4.0)
Requirement already satisfied: h5py in ./Library/Python/2.7/lib/python/site-packages (from mofapy) (2.9.0)
Requirement already satisfied: pytz>=2011k in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from pandas->mofapy) (2013.7)
Requirement already satisfied: python-dateutil>=2.5.0 in ./Library/Python/2.7/lib/python/site-packages (from pandas->mofapy) (2.7.5)
Requirement already satisfied: scikit-learn in ./Library/Python/2.7/lib/python/site-packages (from sklearn->mofapy) (0.20.2)
Requirement already satisfied: six in ./Library/Python/2.7/lib/python/site-packages (from h5py->mofapy) (1.12.0)
New pull of MOFA package (MOFAtools_0.99.0)
> devtools::install_github("bioFAM/MOFA", subdir="MOFAtools")
Downloading GitHub repo bioFAM/MOFA@master
Skipping 15 packages ahead of CRAN: Biobase, BiocGenerics, BiocParallel, DelayedArray, GenomeInfoDb, GenomeInfoDbData, GenomicRanges, IRanges, MultiAssayExperiment, rhdf5, Rhdf5lib, S4Vectors, SummarizedExperiment, XVector, zlibbioc
✔ checking for file ‘/private/var/folders/2r/zlfvsylj481_1f153mph_644b3ydvg/T/RtmpZ6a7f3/remotes5943dbf218d/bioFAM-MOFA-b310386/MOFAtools/DESCRIPTION’ ...
─ preparing ‘MOFAtools’:
✔ checking DESCRIPTION meta-information ...
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ looking to see if a ‘data/datalist’ file should be added
─ building ‘MOFAtools_0.99.0.tar.gz’ (1.5s)
Warning: invalid uid value replaced by that for user 'nobody'
Warning: invalid gid value replaced by that for user 'nobody'
* installing *source* package ‘MOFAtools’ ...
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (MOFAtools)
> MOFAobject <- runMOFA(MOFAobject)
[1] "No output file provided, using a temporary file..."
###########################################################
### __ __ ___ _____ _ ###
### | \/ |/ _ \| ___/ \ ###
### | |\/| | | | | |_ / _ \ ###
### | | | | |_| | _/ ___ \ ###
### |_| |_|\___/|_|/_/ \_\ ###
### ###
###########################################################
Loaded view 0 with 200 samples and 310 features...
Loaded view 1 with 200 samples and 4248 features...
Loaded view 2 with 200 samples and 5000 features...
Loaded view 3 with 200 samples and 69 features...
##############################################
## Doing sanity checks and parsing the data ##
##############################################
Error in py_call_impl(callable, dots$args, dots$keywords) :
AttributeError: 'list' object has no attribute 'copy'
4.
stop(structure(list(message = "AttributeError: 'list' object has no attribute 'copy'",
call = py_call_impl(callable, dots$args, dots$keywords),
cppstack = structure(list(file = "", line = -1L, stack = c("1 reticulate.so 0x0000000121bb9f9b _ZN4Rcpp9exceptionC2EPKcb + 219",
"2 reticulate.so 0x0000000121bc0a35 _ZN4Rcpp4stopERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE + 53", ...
3.
set_data at entry_point.py#90
2.
mofa_entrypoint$set_data(data = unname(lapply(object@TrainData,
function(x) r_to_py(t(x)))))
1.
Could you re-install the python package from github and try again?
Let me get back to you in a few hours...
python installation using pip install git+git://github.com/bioFAM/MOFA --upgrade
-> Rolling back uninstall of mofapy
However, with the --user
flag -> success :)
carlbru$ pip install git+git://github.com/bioFAM/MOFA --upgrade --user
Collecting git+git://github.com/bioFAM/MOFA
Cloning git://github.com/bioFAM/MOFA to /private/var/folders/2r/zlfvsylj481_1f153mph_644b3ydvg/T/pip-req-build-6KatHF
Requirement already satisfied, skipping upgrade: pandas in ./Library/Python/2.7/lib/python/site-packages (from mofapy==1.1) (0.23.4)
Requirement already satisfied, skipping upgrade: scipy in ./Library/Python/2.7/lib/python/site-packages (from mofapy==1.1) (1.2.0)
Requirement already satisfied, skipping upgrade: numpy in ./Library/Python/2.7/lib/python/site-packages (from mofapy==1.1) (1.16.0)
Requirement already satisfied, skipping upgrade: sklearn in ./Library/Python/2.7/lib/python/site-packages (from mofapy==1.1) (0.0)
Requirement already satisfied, skipping upgrade: argparse in ./Library/Python/2.7/lib/python/site-packages (from mofapy==1.1) (1.4.0)
Requirement already satisfied, skipping upgrade: h5py in ./Library/Python/2.7/lib/python/site-packages (from mofapy==1.1) (2.9.0)
Requirement already satisfied, skipping upgrade: pytz>=2011k in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from pandas->mofapy==1.1) (2013.7)
Requirement already satisfied, skipping upgrade: python-dateutil>=2.5.0 in ./Library/Python/2.7/lib/python/site-packages (from pandas->mofapy==1.1) (2.7.5)
Requirement already satisfied, skipping upgrade: scikit-learn in ./Library/Python/2.7/lib/python/site-packages (from sklearn->mofapy==1.1) (0.20.2)
Requirement already satisfied, skipping upgrade: six in ./Library/Python/2.7/lib/python/site-packages (from h5py->mofapy==1.1) (1.12.0)
Installing collected packages: mofapy
Found existing installation: mofapy 1.0
Uninstalling mofapy-1.0:
Successfully uninstalled mofapy-1.0
Running setup.py install for mofapy ... done
Successfully installed mofapy-1.1
RunMOFA()
now seems to work:
...
Iteration 1227: time=0.40 ELBO=-3129248.31, deltaELBO=0.0996, Factors=10
Converged!
###########################################
## Training finished, processing results ##
###########################################
Great, thanks for the confirmation. If you want personalised help on interpreting your model, don't hesitate to reach me via the Slack channel
Hi, New to MOFA and super excited to try it out :)
I am installing/running CLL tutorial for the 1st time. Must warn: I speak R pretty OK, but am a total python illiterate.
Installation of python part was nightmarish. Suggest easier installation tutorial (e.g. install pip like this; install python like this with links to such sites). Several error messages during installation. Googled for tips and tricks. Manual tweaks for installing python package dependencies. Added --user flag to most installation steps. Finally, exited installation without error messages
R installation however flawless.
Running thru CLL tutorial: All steps up to and including
prepareMOFA()
OKWhen running
MOFAobject <- runMOFA(MOFAobject)
I get error message:Error in py_call_impl(callable, dots$args, dots$keywords) : AttributeError: 'list' object has no attribute 'copy' In addition: Warning message: In if (class(mofa) == "try-error") { :
With traceback:
I guess something not quite right with python installation anyway?
Best wishes, Carl