<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Mad Prime: Tag programming</title>
    <link>http://www.madprime.org/articles/tag/programming</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>ExploreTree update</title>
      <description>&lt;p&gt;ExploreTree, a &lt;a href="http://www.processing.org"&gt;processing&lt;/a&gt; program I've made for displaying and browsing tree data structures, has been rewritten and features have been added. New features include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Two modes of drawing: "slanted" and "radial" (see pics below)&lt;/li&gt;
&lt;li&gt;Two methods of avoiding overlapping node names: "nudge" and "hide"&lt;/li&gt;
&lt;li&gt;Dotted lines indicating more of the tree lies beyond an outer node&lt;/li&gt;
&lt;li&gt;Dynamic tree depth: adjusts depth so that there is never more than N nodes visible&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Old features still there are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Search for organism &amp;amp; path highlighting&lt;/li&gt;
&lt;li&gt;Click to move to a node&lt;/li&gt;
&lt;li&gt;Forward and backwards movement with arrow keys&lt;/li&gt;
&lt;li&gt;Font adjustment &amp;amp; tree depth adjustment&lt;/li&gt;
&lt;li&gt;Right-clicking on a node (or control-click for Macs) opens up the corresponding Wikipedia page&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The main version of the tree, a manually created tree I've made, is on the main site &lt;a href="http://www.exploretree.org"&gt;www.exploretree.org&lt;/a&gt;. Here is an image of it as a "slanted" tree with "nudged" nodes, near "rose" (to which the path is highlighted):&lt;/p&gt;

&lt;div align="center"&gt;
  &lt;IMG width=500 SRC=http://www.madprime.org/article_images/20100218_exploretree.jpg&gt;
&lt;/div&gt;

&lt;p&gt;The original version of the program had no ability to display branching distances, but the new version does. You can see this when the it's &lt;a href="http://www.exploretree.org/itol/"&gt;used to display&lt;/a&gt; a tree downloaded from &lt;a href="http://itol.embl.de"&gt;Interactive Tree of Life website&lt;/a&gt;. Here is an image of this as a "radial" tree with overlapping nodes "hidden", within Metazoa (aka. "animals") and the path highlighted to Homo sapiens (aka. "human"):&lt;/p&gt;

&lt;div align="center"&gt;
  &lt;IMG width=500 SRC=http://www.madprime.org/article_images/20100218_exploretree_itol.jpg&gt;
&lt;/div&gt;

&lt;p&gt;In addition to the new features, part of the motivation for this update was that I can envision a lot of adaptations of this program for specific uses. The original version's code was all entangled, making it extremely difficult to modify. This re-write has attempted to modularize the code a fair amount. At the very least this will make it easier for me to create spin-off programs from it in the future. Maybe a version that can read in "GEDCOM" genealogical data to make family trees -- the age of the parent at birth can be used to determine branch lengths!&lt;/p&gt;</description>
      <pubDate>Thu, 18 Feb 2010 16:45:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:09b64f94-b10d-40f8-9f4c-348dfcb802fe</guid>
      <author>Madeleine Ball</author>
      <link>http://www.madprime.org/articles/2010/02/18/exploretree-update</link>
      <category>processing</category>
      <category>visualization</category>
      <category>data</category>
      <category>programming</category>
      <category>evolution</category>
      <category>exploretree</category>
    </item>
    <item>
      <title>ExploreTree &amp;amp; pretty flowers</title>
      <description>&lt;p&gt;The New York Times has a &lt;a href="http://www.nytimes.com/2009/09/08/science/08flower.html"&gt;nice article on flower evolution today&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you enjoy looking at evolutionary trees to see how closely related different living things are, you might enjoy playing with &lt;a href="http://exploretree.org"&gt;ExploreTree&lt;/a&gt;. I've added features that make it a lot more fun: the zooming in and out is animated, you can search for an organism and follow a path. Plus now, with a little help from Chris, it runs on a webpage (feel free to show it to friends &amp;amp; family). Give it time to load, though.&lt;/p&gt;

&lt;p&gt;Here is a snapshot of the location illustrated in the NYTimes article:&lt;/p&gt;

&lt;div align="center"&gt;
  &lt;IMG width=500 SRC=http://www.madprime.org/article_images/exploretree_snapshot.jpg&gt;
&lt;/div&gt;

&lt;p&gt;I've put off posting about the program for a while since I kept hoping to improve it a little more, but here it is. It was written in &lt;a href="http://www.processing.org"&gt;processing&lt;/a&gt;, you can get the code if you'd like to play with it here (or improve it!) &lt;a href="http://github.com/madprime/exploretree/tree/master"&gt;on github&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Tue, 08 Sep 2009 23:13:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:46a13815-a477-4a18-8675-1af9130dcc8a</guid>
      <author>Madeleine Ball</author>
      <link>http://www.madprime.org/articles/2009/09/08/exploretree-pretty-flowers</link>
      <category>programming</category>
      <category>genetics</category>
      <category>biology</category>
      <category>evolution</category>
      <category>exploretree</category>
    </item>
    <item>
      <title>Evolutionary Time</title>
      <description>&lt;p&gt;This last Saturday &lt;a href="http://blog.printf.net"&gt;Chris&lt;/a&gt; and I participated in a &lt;a href="http://burgess.mit.edu/pt/"&gt;code jam&lt;/a&gt; organized by &lt;a href="http://nickm.com/"&gt;a friend&lt;/a&gt; using &lt;a href="http://processing.org/"&gt;processing&lt;/a&gt;, a programming language oriented towards enabling interactive visualization and graphics. I used processing to create all of the graphs in the recent Nature Biotechnology paper - I came to it because I was frustrated with an inability to create exactly the graph type I wanted. In the end each of my graphs is created by a small program, but I'm happy with putting in that effort to get something that looks great.&lt;/p&gt;

&lt;p&gt;For the code jam I had been wanting to create a browsable tree of life akin to the &lt;a href="http://www.sphericalcow.org/index.php?p=16"&gt;fractal-like tree of life comic&lt;/a&gt; I made a while back. To this end I created a &lt;a href="http://en.wikipedia.org/wiki/Newick_format"&gt;Newick format tree&lt;/a&gt;, working my way back from humans. I filled in only organisms and names that were familiar to me, reasoning that obscure organisms only serve to make a tree confusing, cluttered, and unapproachable. So far I'm only as far as unikonts, you can get a copy of it &lt;a href="http://mad.printf.net/treeoflife.tree"&gt;here&lt;/a&gt; if you like. (Please consider this as licensed under &lt;a href="http://creativecommons.org/licenses/by-sa/3.0/"&gt;CC-by-SA&lt;/a&gt; if you'd like to use it.)&lt;/p&gt;

&lt;p&gt;Chris found and applied some java code for interpreting a newick format file and creating a tree data structure, and I worked out a simple recursion for drawing the tree out to a given depth from a given node. Clicking on a node redraws the tree from that location; pressing any key zooms back out by one level. Here is a screenshot of the base:&lt;/p&gt;

&lt;p&gt;&lt;IMG SRC=http://www.madprime.org/article_images/treeroot_500px.png&gt;&lt;/p&gt;

&lt;p&gt;One of the nice aspects of processing is that visualizations should be portable to java applets. Although we haven't done it yet, hopefully we'll be able to do that. If you have processing installed, you can &lt;a href="http://chris.printf.net/evolutionary_time.zip"&gt;download a copy&lt;/a&gt; of what we wrote. (You'll need to fix the file path in the source code to point at the tree.) Other improvements I'd like to do: to make zooming smooth rather than jumping (this can be disorienting when a large change occurs) and add the ability to search and choose an organism, then color the tree according to distance from that organism so you can click "warmer" colors to get closer to it.&lt;/p&gt;

&lt;p&gt;The theme of the event was "clocks" and although I had intended to work on this anyway, it did fit into the theme fairly well: we called the program "Evolutionary Time". We were thrilled to be awarded the "wealth" prize by processing founders &lt;a href="http://benfry.com/"&gt;Ben Fry&lt;/a&gt; and &lt;a href="http://reas.com"&gt;Casey Reas&lt;/a&gt;: a gift certificate to the MIT Press Bookstore, which I intend to spend on a reference or two for processing, hopefully to further improve our program. ;-)&lt;/p&gt;</description>
      <pubDate>Tue, 05 May 2009 02:44:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:3ac5c9cb-9161-4f33-b974-1d6e10799fcb</guid>
      <author>Madeleine Ball</author>
      <link>http://www.madprime.org/articles/2009/05/05/evolutionary-time</link>
      <category>evolution</category>
      <category>processing</category>
      <category>biology</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
