mholder's blog "https://phylo.bio.ku.edu/blog/mholder en ivy on Mac "https://phylo.bio.ku.edu/content/ivy-mac <p><a href="http://www.bioinformatics.org/~rick/">Rick Ree</a> just gave an <a href="http://ievobio.org/">iEvoBio</a> talk on his (very slick) Python-based interactive environment for phylogenetics called <a href="http://www.reelab.net/ivy/index.html">ivy</a>.</p> <p>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:</p> <hr/> <pre lang="bash"> wget <a href="https://phylo.bio.ku.edu/software/ivy.tar.bz" title=""https://phylo.bio.ku.edu/software/ivy.tar.bz">"https://phylo.bio.ku.edu/software/ivy.tar.bz</a> tar xfvj ivy.tar.bz cd ivy source ivydev/bin/activate ipython -pylab </pre><hr/> and then you should be able to see his user's guide at <a href="http://www.reelab.net/ivy/using.html" title="http://www.reelab.net/ivy/using.html">http://www.reelab.net/ivy/using.html</a> for instructions on usage. <p>For reference, I created the bundle by:</p> <hr/> <pre lang="bash"> 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 .. </pre></hr/></hr/></hr/><p><a href="https://mtholder.github.io/home/content/ivy-mac" target="_blank">read more</a></p> Tue, 10 Jul 2012 15:28:18 +0000 mholder 711 at "https://phylo.bio.ku.edu Phylotastic TNRS client "https://phylo.bio.ku.edu/content/phylotastic-tnrs-client <p>An example client of the demo implementation of the <a href="http://www.evoio.org/wiki/Phylotastic/TNRS">TNRS built at phylotastic</a> can be run using<br /> <code><br /> python phylotastic_tnrs_client.py<br /> </code><br /> then typing some names (one per line) and closing the standard input stream with Ctrl-D.</p> <p>You can also put the names in a file and pass the filepaths as command line arguments to the script.</p> <p>The code is available as a gist.<br /> <script src="http://gist.github.com/2967726.js"></script></p> Thu, 21 Jun 2012 18:33:17 +0000 mholder 710 at "https://phylo.bio.ku.edu Compiling g++ 4.7 "https://phylo.bio.ku.edu/content/compiling-g-47 <p>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: <a href="https://mtholder.github.io/home/public/gcc4.7.tar.gz" title=""https://phylo.bio.ku.edu/public/gcc4.7.tar.gz">"https://phylo.bio.ku.edu/public/gcc4.7.tar.gz</a></p> <p>See<br /> <script src="http://gist.github.com/2906937.js"></script></p> Sun, 10 Jun 2012 21:50:55 +0000 mholder 709 at "https://phylo.bio.ku.edu Odd bug in g++ on darwin - implicit conversion of NULL to pointer not working on all architectures "https://phylo.bio.ku.edu/content/odd-bug-g-darwin-implicit-conversion-null-pointer-not-working-all-architectures <p><a href="http://jeetworks.org/about">Jeet</a> and I tracked this down after I was having issues compiling <a href="https://github.com/revbayes/revbayes">RevBayes</a>, while it was working for him. It turns out that <a href="http://www.cmake.org/">CMake</a> was including compiler flags for me that it was not including for him (fwiw: I compiled cmake, Jeet used a pre-built version). </p> <p>Here is the very odd bit. The code</p> <div class="geshifilter"><pre class="python geshifilter-python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#include &lt;list&gt;</span> <span style="color: #008000;">int</span> main<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> <span style="color: black;">&#123;</span> std::list<span style="color: #66cc66;">&lt;</span>int<span style="color: #66cc66;">*&gt;</span> x<span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span>, NULL<span style="color: black;">&#41;</span><span style="color: #66cc66;">;</span> <span style="color: black;">&#125;</span></pre></div> <p>will compile with a simple <tt>g++ t.cpp -arch x86_64</tt> when using <tt>i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)</tt> on a MacBookPro running 10.6.8.</p> <p>The same code will not compile if you use the using tho <tt>-arch i386</tt> flag. The compiler (not linker!) error is:</p><p><a href="https://mtholder.github.io/home/content/odd-bug-g-darwin-implicit-conversion-null-pointer-not-working-all-architectures" target="_blank">read more</a></p> Thu, 22 Sep 2011 02:48:04 +0000 mholder 695 at "https://phylo.bio.ku.edu matplotlib and scipy for i386/x86_64 version of python 2.7 "https://phylo.bio.ku.edu/content/matplotlib-and-scipy-i386x8664-version-python-27 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 <tt>$ file $(which python)</tt> 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.<p><a href="https://mtholder.github.io/home/content/matplotlib-and-scipy-i386x8664-version-python-27" target="_blank">read more</a></p> Sun, 06 Mar 2011 02:28:29 +0000 mholder 690 at "https://phylo.bio.ku.edu ecmascript for python programmers "https://phylo.bio.ku.edu/content/ecmascript-python-programmers <p>Disclaimer: I have written <b>very little</b> 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 <a href="http://developer.yahoo.com/yui/theater/video.php?v=crockonjs-3">http://developer.yahoo.com/yui/theater/video.php?v=crockonjs-3</a> (and related) videos for a nice description of different aspects of ECMAScript, and <a href="https://developer.mozilla.org/en/JavaScript/Reference">https://developer.mozilla.org/en/JavaScript/Reference</a> and <a href="http://javascript-reference.info/">http://javascript-reference.info/</a> for terse language references. </p><p><a href="https://mtholder.github.io/home/content/ecmascript-python-programmers" target="_blank">read more</a></p> Sun, 02 Jan 2011 23:49:42 +0000 mholder 686 at "https://phylo.bio.ku.edu likelihood demo script "https://phylo.bio.ku.edu/content/likelihood-demo-script <p>Requires PyQt.</p> <p>Your mileage may vary.</p> <p>Instructions to come soon (hopefully)</p> <p>Download <a href="https://mtholder.github.io/home/sites/default/files/likelihood_demo.py.txt">"https://phylo.bio.ku.edu/sites/default/files/likelihood_demo.py.txt</a><br /> and save it as likelihood_demo.py</p> Sat, 31 Jul 2010 02:14:39 +0000 mholder 677 at "https://phylo.bio.ku.edu building self-contained phycas Debian package "https://phylo.bio.ku.edu/content/building-self-contained-phycas-debian-package <p>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.</p> <p>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 )</p> <ol> <li>Save <a href="https://mtholder.github.io/home/sites/default/files/Phycas_sh.txt">Phycas_sh.txt</a> as <tt>Phycas</tt> with the executable bit set </li></ol> Thu, 29 Jul 2010 21:07:54 +0000 mholder 676 at "https://phylo.bio.ku.edu building self-contained phycas bundles "https://phylo.bio.ku.edu/content/building-self-contained-phycas-bundles <p>Below are instructions for creating (refilling is a more accurate term) our iTerm4Phycas .app bundle for Mac.<br /> The scripts below puts python 2.6.5 , ipython, ncl in the iTerm-based .app bundle.<br /> All phycas dependencies are built for i386.</p> <p>Updated July, 31, 2010</p> <ol> <li> Download <a href="https://mtholder.github.io/home/sites/default/files/build_phycas_standalone_bundle.sh_.txt">build_phycas_standalone_bundle.sh_.txt<br /> </a> to a fresh directory and rename it as <tt>build_phycas_standalone_bundle.sh</tt></li> <li> Download <a href="https://mtholder.github.io/home/sites/default/files/phycas_standalone_build_env.sh_.txt">phycas_standalone_build_env.sh_.txt</a> to the same directory and rename it as <tt>phycas_standalone_build_env.sh</tt></li> <li>Take a look at the scripts to note how hacky they are</li> <li> Make sure you have wget and svn</li> <li> <tt>sh build_phycas_standalone_bundle.sh</tt></li> </ol><p><a href="https://mtholder.github.io/home/content/building-self-contained-phycas-bundles" target="_blank">read more</a></p> Thu, 29 Jul 2010 18:09:03 +0000 mholder 675 at "https://phylo.bio.ku.edu script for building gcc on kwyjibo "https://phylo.bio.ku.edu/content/script-building-gcc-kwyjibo Not the actual steps that we used, but pretty much. <div class="geshifilter"><pre class="python geshifilter-python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/bin/sh</span> <span style="color: #808080; font-style: italic;"># script to install gcc </span> &nbsp; <span style="color: #008000;">set</span> -x export NEW_GCC_PREFIX=/share/apps/opt/gcc-<span style="color: #ff4500;">4.5</span> export LD_LIBRARY_PATH=$NEW_GCC_PREFIX/lib &nbsp; <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #66cc66;">!</span> <span style="color: #dc143c;">test</span> -f gmp-5.0.1.<span style="color: black;">tar</span>.<span style="color: #dc143c;">bz2</span> then wget ftp://ftp.<span style="color: black;">gmplib</span>.<span style="color: black;">org</span>/pub/gmp-5.0.1/gmp-5.0.1.<span style="color: black;">tar</span>.<span style="color: #dc143c;">bz2</span> || exit fi tar xfvj gmp-5.0.1.<span style="color: black;">tar</span>.<span style="color: #dc143c;">bz2</span> || exit <span style="color: #dc143c;">cd</span> gmp-5.0.1 || exit make || exit sudo make install || exit <span style="color: #dc143c;">cd</span> .. || exit &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #66cc66;">!</span> <span style="color: #dc143c;">test</span> -f mpfr-3.0.0.<span style="color: black;">tar</span>.<span style="color: #dc143c;">bz2</span> then wget http://www.<span style="color: black;">mpfr</span>.<span style="color: black;">org</span>/mpfr-current/mpfr-3.0.0.<span style="color: black;">tar</span>.<span style="color: #dc143c;">bz2</span> || exit fi tar xfvj mpfr-3.0.0.<span style="color: black;">tar</span>.<span style="color: #dc143c;">bz2</span> || exit <span style="color: #dc143c;">cd</span> mpfr-<span style="color: #ff4500;">3.0</span>.<span style="color: black;">X</span> || exit ./configure --with-gmp=$NEW_GCC_PREFIX --prefix=$NEW_GCC_PREFIX || exit make || exit make check || exit sudo make install || exit <span style="color: #dc143c;">cd</span> .. || exit &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #66cc66;">!</span></pre></div><p><a href="https://mtholder.github.io/home/content/script-building-gcc-kwyjibo" target="_blank">read more</a></p> Thu, 22 Jul 2010 23:24:24 +0000 mholder 674 at "https://phylo.bio.ku.edu