mholder's blog

ivy on Mac

Rick Ree just gave an iEvoBio talk on his (very slick) Python-based interactive environment for phylogenetics called ivy.

I posted the virtualenv-created directory with my install for Mac (python 2.7, i386+x86_64 fat bundle). This might work for you if you do this:


wget http://phylo.bio.ku.edu/software/ivy.tar.bz
tar xfvj ivy.tar.bz
cd ivy
source ivydev/bin/activate
ipython -pylab

and then you should be able to see his user's guide at http://www.reelab.net/ivy/using.html for instructions on usage.

For reference, I created the bundle by:



mkdir ivy
cd ivy
virtualenv ivydev
. ivydev/bin/activate
pip install ivy-phylo
for module in matplotlib scipy numpy biopython pyparsing ipython lxml PIL ; do
    pip install --upgrade "$module" ;
done
cd ..

Phylotastic TNRS client

An example client of the demo implementation of the TNRS built at phylotastic can be run using

python phylotastic_tnrs_client.py

then typing some names (one per line) and closing the standard input stream with Ctrl-D.

You can also put the names in a file and pass the filepaths as command line arguments to the script.

The code is available as a gist.

Compiling g++ 4.7

I wanted to try out gcc witth c++11, so I had to compile gcc version 4.7, and posted the install directory that I used at: http://phylo.bio.ku.edu/public/gcc4.7.tar.gz

See

Odd bug in g++ on darwin - implicit conversion of NULL to pointer not working on all architectures

Jeet and I tracked this down after I was having issues compiling RevBayes, while it was working for him. It turns out that CMake was including compiler flags for me that it was not including for him (fwiw: I compiled cmake, Jeet used a pre-built version).

Here is the very odd bit. The code

#include <list>
int main() {
    std::list<int*> x(1, NULL);
}

will compile with a simple g++ t.cpp -arch x86_64 when using i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) on a MacBookPro running 10.6.8.

The same code will not compile if you use the using tho -arch i386 flag. The compiler (not linker!) error is:

matplotlib and scipy for i386/x86_64 version of python 2.7

In a fit of masochism I installed the i386/x86_64 binary of Python 2.7 for Mac, which is available from: http://www.python.org/ftp/python/2.7.1/python-2.7.1-macosx10.6.dmg on my laptop. Note that $ file $(which python) reports Mach-O executable i386 and Mach-O 64-bit executable x86_64 for this installation of python. I wanted to use scipy and matplotlib, which is where the trouble began because there are not binaries of those for python 2.7 for this architecture.

ecmascript for python programmers

Disclaimer: I have written very little ECMAScript, I'm using this post as a place to store my notes. The odds that I have some of the details wrong is high. See http://developer.yahoo.com/yui/theater/video.php?v=crockonjs-3 (and related) videos for a nice description of different aspects of ECMAScript, and https://developer.mozilla.org/en/JavaScript/Reference and http://javascript-reference.info/ for terse language references.

likelihood demo script

Requires PyQt.

Your mileage may vary.

Instructions to come soon (hopefully)

Download http://phylo.bio.ku.edu/sites/default/files/likelihood_demo.py.txt
and save it as likelihood_demo.py

building self-contained phycas Debian package

OK, so this goes against the grain of a good package management system (which Debian has), by bundling dependencies. We've had some serious issues in the past with getting our versions of python in sync with boost libraries, ncl, and python.

So below are the instructions for creating a debian package that installs NCL, python2.7, ipython, and puts phycas into (lib/python2.6/site-packages )

  1. Save Phycas_sh.txt as Phycas with the executable bit set

building self-contained phycas bundles

Below are instructions for creating (refilling is a more accurate term) our iTerm4Phycas .app bundle for Mac.
The scripts below puts python 2.6.5 , ipython, ncl in the iTerm-based .app bundle.
All phycas dependencies are built for i386.

Updated July, 31, 2010

  1. Download build_phycas_standalone_bundle.sh_.txt
    to a fresh directory and rename it as build_phycas_standalone_bundle.sh
  2. Download phycas_standalone_build_env.sh_.txt to the same directory and rename it as phycas_standalone_build_env.sh
  3. Take a look at the scripts to note how hacky they are
  4. Make sure you have wget and svn
  5. sh build_phycas_standalone_bundle.sh

script for building gcc on kwyjibo

Not the actual steps that we used, but pretty much.
#!/bin/sh
# script to install gcc 
 
set -x
export NEW_GCC_PREFIX=/share/apps/opt/gcc-4.5
export LD_LIBRARY_PATH=$NEW_GCC_PREFIX/lib
 
if ! test -f gmp-5.0.1.tar.bz2 
then
    wget ftp://ftp.gmplib.org/pub/gmp-5.0.1/gmp-5.0.1.tar.bz2  || exit
fi
tar xfvj gmp-5.0.1.tar.bz2  || exit
cd gmp-5.0.1  || exit
make || exit
sudo make install  || exit
cd ..  || exit
 
 
if ! test -f mpfr-3.0.0.tar.bz2 
then
    wget http://www.mpfr.org/mpfr-current/mpfr-3.0.0.tar.bz2  || exit
fi
tar xfvj mpfr-3.0.0.tar.bz2  || exit
cd mpfr-3.0.X  || exit
./configure --with-gmp=$NEW_GCC_PREFIX --prefix=$NEW_GCC_PREFIX  || exit
make  || exit
make check  || exit
sudo make install  || exit
cd ..  || exit
 
 
if !
Syndicate content