Tuesday, October 4, 2011

Qiime-1.3.0 :: Installation

Download Qiime-1.3.0 from
URL: http://sourceforge.net/projects/qiime/files/releases/Qiime-1.3.0.tar.gz/download

Installation on Ubuntu 64-bit machine

Extract the contents in the tar ball
$ tar zxvf Qiime-1.3.0.tar.gz
$ cd Qiime-1.3.0
$ vim README

Dependencies( check and Install)
1. Python >= 2.6
$ python --version
Python 2.7.1+

2. NumPy >= 1.3.0
$ tar zxvf numpy-1.6.1.tar.gz
$ cd numpy-1.6.1/
$ python setup.py install --user   # installs to your home directory

or
$ sudo apt-get install python-numpy python-numpy-doc

3. PyCogent >= 1.5.1.
Extract the contents
$ tar zxvf PyCogent-1.5.1.tgz
$ cd PyCogent-1.5.1/

With root access,
$ python setup.py build
$ sudo python setup.py install

Without root access,
$ python setup.py build_ext -if
- which compiles the extensions in place (the i option) forcibly (the f option, ie even if they’ve already been compiled).
- move the cogent directory to where you want it (or leave it in place)
- add this location to your python path using sys.path.insert(0, "/your/path/to/PyCogent") in each script, or by setting shell environment variables (e.g. $ export PYTHONPATH=/your/path/to/PyCogent:$PYTHONPATH)

4. Matplotlib
$ sudo apt-get install python-matplotlib 


Installation Qiime
$ python setup.py install --install-scripts=/home/username/qiime/bin/ --install-purelib=/home/username/qiime/lib/ --install-data=/home/username/qiime/lib/
- where user has to be replaced with username of the current user.
- As of now, it runs into a problem
:
running install_data
error: can't copy 'qiime/support_files/denoiser/bin/FlowgramAli_4frame': doesn't exist or not a regular file.

I looked up in Qiime Google groups page, as of this post, the developers has been informed on this error with setup.py and they have mentioned on rectifying it. This error may not show when u download. If it does, then a small trick completes the installation. Just run the below command and rerun the setup.py command
$ touch qiime/support_files/denoiser/bin/FlowgramAli_4frame

NOTE: 
- If you DO NOT intend on using denoiser, it works good
- If you Do intend on using denoiser, it will create an error called
cogent.app.util.ApplicationError: Calling /home/username/qiime/lib/qiime/support_files/denoiser/bin/FlowgramAli_4frame failed. Check permissions and that it is in fact an executable.
- I am not sure yet how to solve this.

The build will succeed with the following message
Build finished. The HTML pages are in _build/html.
Local documentation built with Sphinx. Open to following path with a web browser:
/path/to/Qiime-1.3.0/doc/_build/html/index.html

If you have installed Qiime using above steps then you have to provide path in .bashrc file
$ echo "export PATH=/home/username/qiime/bin/:$PATH" >> ~/.bashrc
$ echo "export PYTHONPATH=/home/username/qiime/lib/:$PYTHONPATH" >> ~/.bashrc
$ source ~/.bashrc
- dont forget to replace the username with your username

Now move the qiime config file to your home directory
$ cp qiime/support_files/qiime_config ~/.qiime_config

Since we created the binary files in another location, we have to provide the path to it in the configuration file. Look for the line that begins with qiime_scripts_dir
$ vim ~/.qiime_config
qiime_scripts_dir /home/username/qiime/bin
- Note, the white space between the two values is a tab, Dont use space
- Also dont forget to replace the username with your username.

Testing
Move to the tests folder and execute the tests script
$ cd tests
$ python all_tests.py





No comments:

Post a Comment