This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description


tapir contains programs to estimate and plot phylogenetic informativeness for large datasets.

Citing tapir

When using tapir, please cite:

  • Faircloth BC, Chang J, Alfaro ME: tapir enables high throughput analysis of phylogenetic informativeness.
  • Townsend JP: Profiling phylogenetic informativeness. Systematic Biol. 2007, 56:222-231.
  • Pond SLK, Frost SDW, Muse SV: HyPhy: hypothesis testing using phylogenies. Bioinformatics 2005, 21:676-679.


  • hyphy2 (please download or build a single-threaded hyphy2)
  • Python 2.6
  • numpy
  • scipy
  • dendropy


For ALL platforms, you must download a hyphy binary for your platform (osx or linux) and place that within your $PATH:

gunzip hyphy2.*.gz
chmod 0700 hyphy2.*
mv hyphy2.* ~/Bin/hyphy2

To install the other dependencies (numpy, scipy), you may need to install a Fortran compiler on linux/osx:


On linux (ubuntu/debian), use:

apt-get install gfortran libatlas-base-dev liblapack-dev

Install tapir and dependencies, which include numpy and scipy (the reason we installed the dependencies above):

pip install tapir

To plot results, you will also need to:

apt-get install r-base r-base-dev
pip install rpy2


It is easiest just to install the scipy superpack. This will install the dependencies that tapir needs. After installing the superpack, using pip, install tapir:

pip install tapir

Alternatively, you can simply try to install tapir using:

pip install tapir

To plot results, you need to install R and then install rpy2:

pip install rpy2

Other OSs

Install numpy, scipy, and dendropy for your platform. Then:

tar -xzvf tapir-1.0.tar.gz
cd tapir*
python build
python test
python install


Plotting is optional. To install the plotting dependencies, see Installation, above.


If you didn’t run the tests using \(python test\) above, you can also:

import tapir


The \(\) code calls a batch file for hyphy that is in \(templates/\). This file needs to be in the same position relative to wherever you put \(\). If you install thins as above, you’ll be fine, for the moment.

To run:

cd /path/to/tapir/

python Input_Folder_of_Nexus_Files/ Input.tree \
    --output Output_Directory \
    --epochs=32-42,88-98,95-105,164-174 \
    --times=37,93,100,170 \

\(--multiprocessing\) is optional, without it, each locus will be run consecutively.

If you have already run the above and saved results to your output folder (see below), you can use the pre-existing site-rate records rather than estimating those again with:

python Input_Folder_of_Site_Rate_JSON_Files/ Input.tree \
   --output Output_Directory \
   --epochs=32-42,88-98,95-105,164-174 \
   --times=37,93,100,170 \
   --multiprocessing \


tapir writes results to a sqlite database in the output directory of your choosing. This directory also holds site rate files in JSON format for each locus passed through \(\).

You can access the results in the database as follows. For more examples, including plotting, see the documentation

  • crank up sqlite:

    sqlite3  Output_Directory/phylogenetic-informativeness.sqlite
  • get integral data for all epochs:

    select locus, interval, pi from loci, interval where =
  • get integral data for a specific epoch:

    select locus, interval, pi from loci, interval
    where interval = '95-105' and =;
  • get the count of loci having max(PI) at different epochs:

    create temporary table max as select id, max(pi) as max from interval group by id;
    create temporary table t as select, interval, max from interval, max
    where interval.pi = max.max;
    select interval, count(*) from t group by interval;

Plotting Results

tapir contains plotting scripts to help you plot data within a results database and compare data between different databases. tapir uses RPY and R to do this. You can also plot data directly in R. Until we finish the documentation, please see the wiki for examples.


BCF thanks SP Hubbell, PA Gowaty, RT Brumfield, TC Glenn, NG Crawford, JE McCormack, and M Reasel. JHLC and MEA thank J Eastman and J Brown for thoughtful comments about PI. We thank Francesc Lopez-Giraldez and Jeffrey Townsend for providing us with a copy of their web-application source code and helpful discussion.

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
tapir-1.0.tar.gz (121.7 kB) Copy SHA256 Checksum SHA256 Source Nov 7, 2011

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting