#!/bin/bash # Default Chimera install path CHIMERA="${HOME}/src/Chimera.app/Contents/Resources" # Optional input parameter for Chimera install path if [ $1 ]; then CHIMERA=$1 fi # Test the existence of the $CHIMERA install path if [ -d $CHIMERA ]; then echo "Chimera install path: ${CHIMERA}" else echo "Invalid Chimera install path: ${CHIMERA}" exit 1 fi export DYLD_FRAMEWORK_PATH=${CHIMERA}/frameworks export DYLD_LIBRARY_PATH=${CHIMERA}/lib export LD_LIBRARY_PATH=${CHIMERA}/lib export PATH=${CHIMERA}/bin:${PATH} mkdir -p ~/Downloads/ cd ~/Downloads/ rm -rf distribute* curl -O http://python-distribute.org/distribute_setup.py ${CHIMERA}/bin/python2.7 distribute_setup.py easyInstall=$(find ${CHIMERA} -name "easy_install") CHIMERA_BIN=$(dirname $easyInstall) ${CHIMERA_BIN}/easy_install pip # Install optional packages # readline requires libncurses #sudo apt-get install ncurses-base ncurses-bin #sudo apt-get install libncurses5-dev libncurses5-dbg #sudo apt-get install libncursesw5-dev libncursesw5-dbg # the ipython-readline support might not work with pip ${CHIMERA_BIN}/easy_install readline ipython ${CHIMERA_BIN}/pip install --upgrade bpython ${CHIMERA_BIN}/pip install --upgrade pylint ${CHIMERA_BIN}/pip install --upgrade pyflakes ${CHIMERA_BIN}/pip install --upgrade rpyc # Add Biopython #${CHIMERA_BIN}/pip install --upgrade biopython ${CHIMERA_BIN}/easy_install -f http://biopython.org/DIST/ biopython # Create a virtualenv ${CHIMERA_BIN}/easy_install virtualenv CHIMERA_VIRTUAL="${HOME}/src/chimera/virtualenv" ${CHIMERA_BIN}/virtualenv --clear --distribute $CHIMERA_VIRTUAL exit # Use the virtualenv to add new packages source ${CHIMERA_VIRTUAL}/bin/activate easy_install readline ipython deactivate exit