Closed biogberg closed 8 years ago
Hi,
for easy installation, don't clone the repository, but instead download the release package linked on the front page (direct link), as that way you don't need swig and everything should actually work. Then follow the installation instructions; if you just want to use MOODS as a standalone tool, it's probably easiest to follow Option 1 (and then use moods_dna.py
script, see Getting Started).
Installation from the repository is somewhat more complicated process because of reasons.
Hi,
Thank you for your comments. I was using version 1.9.2. My results were produced on a clean download. I need to use swig as the build requires core/tools_wrap.cxx etc. and they are not in the distribution.
For reference python is 2.7.11, swig is 3.0.8 and gcc is 4.9.2.
Regards,
Bernt
Missing tools_wrap.cxx
does sound like you've used git clone
to clone the repository (or alternatively used the "download zip" button to get a snapshot of the development tree) instead of downloading the release tarball linked on the MOODS Github page (scroll down to "Downloads"), as the swig wrapper .cxx
files are included in the release tarball (just double-checked this). Try this:
wget https://github.com/jhkorhonen/MOODS/releases/download/v1.9.2/MOODS-python-1.9.2.tar.gz
tar xvf MOODS-python-1.9.2.tar.gz
cd MOODS-python-1.9.2
python setup.py build_ext --inplace
cd scripts/
ln -s ../MOODS/
python moods_dna.py -m example-data/matrices/*.{pfm,adm} -s example-data/seq/chr1-5k-55k.fa -p 0.0001
If the above does not work, please attach a full log of running the above commands.
Now that I think about this, the "Download ZIP" button is probably the cause of this problem, and I can see why that can be confusing. The long and short of it is that that button gives you a zip of the github master branch, but that gives you the files and directory layout that I use when developing MOODS, which in particular does not contain the swig-generated files (as these are anyway re-generated when things change). A bunch of scripts is then used to produce the release package from these files, which has different directory layout and the swig files for easy building.
Hi, Thank you. I can confirm that re-downloading and starting from scratch makes things work. Sorry for the inconvenience. Regards, Bernt
Hi,
I have used older versions of moods, but when I tried to update I ran into problems. Below is a summary.
Am I doing something obviously wrong? I'm not very experienced with python. Is there a way to get a simple executable without any python?
Best regards,
Bernt
Build command does not work; gcc chokes on:
Changed to root directory of distribution and ran
Several source files are not found. setup.py does not run swig. Tried to run swig manually. Turns out build requires a relatively recent version of swig. Running newer version of swig manually.
etc. succeeds.
Running
fails with
Created MOODS directory in root directory of distribution.
Build now warns:
Switching to different version of gcc does not help.
Build proceeds with lots and lots of warnings.
install warns
MOODS/init.py is an empty file
Tried to run example from root of distribution (had to change path to script):