You can download the latest stable release of PyNAST here.
You can download the latest development branch of PyNAST here with the command:
svn co https://pynast.svn.sourceforge.net/svnroot/pynast PyNAST
PyNAST is built on the PyCogent package, and uses uclust. You must have PyCogent 1.4.1 and uclust v1.1.579 installed to run PyNAST. You should first obtain these software packages, and install them according to the instructions provided by their authors.
If you’d like to perform pairwise alignments using BLAST, MUSCLE, MAFFT, or ClustalW, you must have those programs installed on your machine and in your system path. Currently tested versions are BLAST 2.2.22, MUSCLE v3.6, MAFFT v6.602b, and ClustalW 1.81. Note that PyNAST makes use of the legacy BLAST software, not BLAST+.
Download PyCogent 1.4.1 (src) and its dependencies, Python 2.6 or greater (but less than Python 3.0) and NumPy 1.3.0 or greater.
Download and install uclust. Binaries are available, or you can install from source (binaries and src).
svn co https://pynast.svn.sourceforge.net/svnroot/pynast PyNAST
If you downloaded from svn, you will have a new folder in the current working directory called PyNAST. If you downloaded PyNAST-1.1, after untar/unzipping PyNAST-1.1.tar.gz will have a new directory named PyNAST-1.1. For consistency, all instructions below will refer to this directory as PyNAST. You may choose to rename PyNAST-1.1 as PyNAST.
cd PyNAST
python setup.py install
cd tests
python all_tests.py
cd
pynast -h
PyNAST consists of library code and a script. By default the script will be installed in /usr/local/bin. This can be customized with the -install_scripts option like:
python setup.py install --install-scripts=/home/pynast_user/bin/
You can similarly install the library code in an alternate location using the --install-purelib option:
python setup.py install --install-purelib=/home/pynast_user/lib/
A combination of these options is also possible:
python setup.py install --install-scripts=/home/pynast_user/bin/ --install-purelib=/home/pynast_user/lib/
For a complete discussion of customizations related to the setup.py script, see this page.
If you specify an alternate directory for --install-purelib, you’ll need to ensure that python knows where to look for the pynast module. Following the example above, you would do this with the following commands:
echo "export PYTHONPATH=/home/pynast_user/lib/:$PYTHONPATH" >> /home/pynast_user/.bashrc
source /home/pynast_user/.bashrc
Similarly, if you specify an alternate directory for --install-scripts, you’ll need to ensure that the shell knows where to look for executable files. Following the example above, you would do this with the following commands:
echo "export PATH=/home/pynast_user/bin/:$PATH" >> /home/pynast_user/.bashrc
source /home/pynast_user/.bashrc
After installing the PyNAST software as described above, you should download the sample candidate sequences and template alignment. You can then apply the PyNAST command line tool as follows:
pynast -i candidate_seqs_sample.fasta -t template_sample.fasta
This will result in three files being written to the current working directory: candidate_seqs_sample_pynast_aligned.fasta, candidate_seqs_sample_pynast_log.txt, and candidate_seqs_sample_pynast_fail.fasta, which correspond to the alignment, the run log, and the list of sequences which failed to align, respectively.
To get usage information for the PyNAST command line application run:
pynast -h