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





Friday, September 9, 2011

HTML5 :: div :: rounded corners :: webkit

CSS with webkit
.round {
  -moz-border-radius:    10px;
  -webkit-border-radius: 10px;
}

CSS without webkit
.round {
  // All corners are round
  border-radius: 10px;
  // diagonally opposite corners are rounded;
  border-radius: 10px 3px;
  // custom round
  border-radius: 20px 3px 8px 14px;
}

HTML5 :: Work in IE8


HTML5 tags dont work on IE, to make it work include the lines below in the <head>

<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->;

HTML5 :: div :: shadow

Give Shadow to a div in HTML5

HTML5
<div class="shadow">
Something
</div>

CSS
.shadow {
-moz-box-shadow: 0 0 30px 5px #999;
-webkit-box-shadow: 0 0 30px 5px #999;
}

Wednesday, June 8, 2011

MySQL : Reset forgotten root password

How to reset forgotten root password on Ubuntu machine

First stop the mysqld daemon
$ /etc/init.d/mysql stop

Now open the mysql in safe mode
$ /usr/bin/mysqld_safe --skip-grant-tables &
- In safe mode login will not ask for password

Now login MySQL as root
$ mysql --user=root mysql
Enter password: <click enter key>

mysql> update user set Password=PASSWORD('new-password-here') WHERE User='root'; 
Query OK, 2 rows affected (0.04 sec)
Rows matched: 2 Changed: 2 Warnings: 0 

mysql> flush privileges; 
Query OK, 0 rows affected (0.02 sec) 

mysql> exit 
Bye

This sets the new password to root.

Wednesday, April 20, 2011

Program :: Emboss

Download URL: ftp://emboss.open-bio.org/pub/EMBOSS/

At TALON, 
$ wget ftp://emboss.open-bio.org/pub/EMBOSS/EMBOSS-6.3.1.tar.gz
$ tar zxvf EMBOSS-6.3.1.tar.gz
$ cd EMBOSS-6.3.1
$ ./configure
$ make
$ ./emboss/needle --help

It should now be working

Tuesday, April 19, 2011

Program :: FASTA

Download url: ftp://ftp.ebi.ac.uk/pub/software/unix/fasta/CURRENT/fasta-36.3.4.tar.gz

$ wget ftp://ftp.ebi.ac.uk/pub/software/unix/fasta/CURRENT/fasta-36.3.4.tar.gz
$ tar zxvf fasta-36.3.4.tar.gz
$ cd fasta-36.3.4


$ cd src/
$ make -f ../make/Makefile.linux_sse2 all
$ cd ..
$ .bin/fasta36 --help
$ /bin/fasta36 -d 10 -E 1e-20 -q input.fasta database.fasta -O fasta.output