NP-Omix / BioCompass

Other
5 stars 3 forks source link

Testing BioCompass in AWS EC2, installing requirements using conda #39

Open tiagolbiotech opened 7 years ago

tiagolbiotech commented 7 years ago

This time I attempted to install BioCompass requirements using conda, according to the commands below

$ scp -r -i ~/Downloads/my-key.pem ~/Desktop/BioCompass/antiSMASH_input/ ubuntu@ec2-54-153-112-136.us-west-1.compute.amazonaws.com:~/

$ scp -r -i ~/Downloads/my-key.pem ~/Desktop/BioCompass/multigeneblast/ ubuntu@ec2-54-153-112-136.us-west-1.compute.amazonaws.com:~/

$ git clone git://github.com/NP-Omix/BioCompass

$ curl -O https://repo.continuum.io/archive/Anaconda3-4.2.0-Linux-x86_64.sh

$ bash Anaconda3-4.2.0-Linux-x86_64.sh

$ conda install -c anaconda click

$ conda install -c anaconda scipy

$ conda install -c anaconda pandas

$ conda install -c anaconda biopython=1.67

$ conda install scikit-learn

$ conda create -n py27 python=2.7 anaconda

$ source ~/.bashrc

$ source activate py27

$ cd BioCompass

$ make INPUTDIR='/home/ubuntu/antiSMASH_input' REFNAME='PAL' MULTIGENEBLASTDIR='/home/ubuntu/multigeneblast' ALL

Resulting in the error

Traceback (most recent call last):
  File "/usr/local/bin/BioCompass", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3080, in <module>
    @_call_aside
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3066, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3093, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 651, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 952, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 839, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'biopython==1.67' distribution was not found and is required by BioCompass
Makefile:63: recipe for target '/home/ubuntu/BioCompass/outputs/database_clusters' failed
make[1]: *** [/home/ubuntu/BioCompass/outputs/database_clusters] Error 1
make[1]: Leaving directory '/home/ubuntu/BioCompass/BioCompass'
Makefile:43: recipe for target 'ALL' failed
make: *** [ALL] Error 2
castelao commented 7 years ago

Try again with branch dev. The commit a43912de83 should have fixed that.

tiagolbiotech commented 7 years ago

I tried, setup.py still exhibits the following error while running.

Installed /usr/local/lib/python2.7/dist-packages/BioCompass-0.6.0-py2.7.egg
Processing dependencies for BioCompass==0.6.0
Searching for biopython==1.68
Reading https://pypi.python.org/simple/biopython/
Best match: biopython 1.68
Downloading https://pypi.python.org/packages/72/6c/e1e13b9df73f9c2539b67d12bc22be6b19779230cadbed04c24f3f3e5ef4/biopython-1.68.tar.gz#md5=078e915185485a5327937029b7577ddc
Processing biopython-1.68.tar.gz
Writing /tmp/easy_install-P5Wh5Z/biopython-1.68/setup.cfg
Running biopython-1.68/setup.py -q bdist_egg --dist-dir /tmp/easy_install-P5Wh5Z/biopython-1.68/egg-dist-tmp-Lc15k8
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.py{}' found anywhere in distribution
warning: no previously-included files matching '*.py-e' found anywhere in distribution
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
castelao commented 7 years ago

Looks like there are two different problems:

  1. The previous error message complains when installing biopython. Did you manage to install biopython? With gcc do you have installed?
  2. If biopython was not installed, I would expect that the BioCompass installation procedure would abort, which means that BioCompass was not installed neither.
  3. Are you trying a fresh BioCompass installation? /usr/local/bin/BioCompass was used in older versions, it shouldn't be trying to use that anymore. Try to pip uninstall BioCompass, then pip install BioCompass
tiagolbiotech commented 7 years ago

Ok, this time I tried (starting a brand new machine at AWS, same AMI):

git clone git://github.com/NP-Omix/BioCompass
sudo apt-get install gcc
curl https://bootstrap.pypa.io/get-pip.py | sudo python #acquires most updated version of pip
sudo apt-get install python-dev #to install missing python headers
sudo pip install BioCompass

Then I got:

[...]
Installing collected packages: biopython, BioCompass
  Running setup.py install for biopython ... done
  Running setup.py install for BioCompass ... done
Successfully installed BioCompass-0.6.0 biopython-1.67

=)

I'll run the software now using the clusters from PAL

tiagolbiotech commented 7 years ago

Running BioCompass after the installation instructions above:

scp -r -i ~/Downloads/key-pair.pem ~/Desktop/BioCompass/multigeneblast/ ubuntu@ec2-54-153-94-90.us-west-1.compute.amazonaws.com:~/

scp -r -i ~/Downloads/key-pair.pem ~/Desktop/BioCompass/antiSMASH_input/ ubuntu@ec2-54-153-94-90.us-west-1.compute.amazonaws.com:~/

sudo make INPUTDIR='/home/ubuntu/antiSMASH_input' REFNAME='PAL' MULTIGENEBLASTDIR='/home/ubuntu/multigeneblast' ALL

The following error occured:

Traceback (most recent call last):
  File "/home/ubuntu/multigeneblast/multigeneblast.py", line 113, in <module>
    from Tkinter import *
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 42, in <module>
    raise ImportError, str(msg) + ', please install the python-tk package'
ImportError: No module named _tkinter, please install the python-tk package
Makefile:96: recipe for target '/home/ubuntu/BioCompass/outputs/mgb_result/PAL_001_1_A' failed
make[1]: *** [/home/ubuntu/BioCompass/outputs/mgb_result/PAL_001_1_A] Error 1
make[1]: Leaving directory '/home/ubuntu/BioCompass/BioCompass'
Makefile:43: recipe for target 'ALL' failed
make: *** [ALL] Error 2

Then, after doing sudo apt-get install python python-tk idle python-pmw python-imaging and trying to re-run, I got the following error:

Constructing Blast+ database
/home/ubuntu/multigeneblast/exec/makeblastdb: 1: /home/ubuntu/multigeneblast/exec/makeblastdb: ????: not found
/home/ubuntu/multigeneblast/exec/makeblastdb: 2: /home/ubuntu/multigeneblast/exec/makeblastdb: ?QH
 ?p”?
     ????: not found
/home/ubuntu/multigeneblast/exec/makeblastdb: 3: /home/ubuntu/multigeneblast/exec/makeblastdb: Syntax error: word unexpected (expecting ")")

Error running BLAST. Retrying...
Error generating internal Blast database, exiting. Please check your system.