Probabilistic Inference of Molecular Evolution
Java Python Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
figures Restructed unfortunate directory hierarchy after the svn-to-git move. Apr 10, 2015

About JPrIME

JPrIME is a Java library primarily aimed at phylogenetics, although other functionality may be added over time as well.

The package is developed and maintained by computational biology groups at Science for Life Laboratory Stockholm. It has its roots in a C++ library named PrIME, primarily developed by PIs Jens Lagergren, Lars Arvestad, and Bengt Sennblad. The first version was written by Joel Sjöstrand. Other important contributors are:

  • Mehmood Alam Khan
  • Raja Hashim Ali
  • Ikram Ullah
  • Owais Mahmudhi
  • Auwn Muhammed
  • Vincent Llorens


The easiest way to install JPrime is to download the latest JAR file found in our Dropbox directory. This is a single JAR file bundled with all external dependencies. It will most likely be named 'jprime-X.Y.Z.jar', with X.Y.Z referring to its current incarnation.

You may place the JAR file anywhere on your computer. However, for frequent use, you may want to add its location to your CLASSPATH or similarly, as outlined on Wikipedia.


Straightforward invocation of the JAR file, in this case using the Delirious (DLRS) model:

java -jar jprime-X.Y.Z.jar Delirious Host.tree Seqs.fa Gene2Host.txt

It can be convenient to create a script with the particular call that you want to use! For example, if you want to try different host trees, create a script in a file (for example) with this contents:

#! /bin/bash
java -jar $JAR Delirious $1 Seqs.fa Gene2Host.txt

After running chmod +x, this script can be called like this:

./ hostfile1.tree

if hostfile1.tree is a Newick host tree that you want to try.


For hacking, the location of the JAR file can be specified explicitly when you start an application such as in this fictitious example:

java -cp ~/mypath/jprime-X.Y.Z.jar se/cbb/jprime/apps/MyApp <args>


For instructions on how to run applications, tutorials, source code, etc., please visit the Wiki pages at JPrIME's home at,

Releases and source code

JPrIME is currently hosted at GitHub:

Frequently Asked Questions

Yes, it is possible to sample realisations using JPrIME-DLRS. Please see the help file for providing arguments by using the following command:

java -jar jprime.jar Delirious -h

A typical example of running JPrIME while sampling realisations would look like this: (examples files can be downloaded from here)

java -jar target/jprime-x.y.z.jar Delirious -i 1000 -t 10 -sm WAG -real realisations.txt 1 -o samples.mcmc sample_data/dlrs_example_1.stree.txt sample_data/dlrs_example_1.fa.txt sample_data/