Downloading and Installing

A link to the sfs_coder tarball will appear here at release.

Installation

Installation is handled by python’s distutils.

Using a terminal, execute the following commands:

  1. cd into the sfs_coder source directory.

    cd /path/to/sfs_coder
    
  2. run setup.py install

    python setup.py install
    

If you don’t get any errors with the above steps, you should be able to open python and import sfscoder.

python
import sfscoder

If you still don’t have any errors, you’re good to go.

Installing if you don’t have admin status on your machine

It’s possible you will get a “permission denied” error after step 2 if you don’t have write access to the default install location on your machine. In that case, try

python setup.py install --user

which should install in a location that you have access to. Repeat the last two steps above to make sure it’s working (i.e., try to import sfscoder). If it’s still not working feel free to contact us. We’ve only tested this on a few Unix based platforms and it’s possible (likely?) that some system specific problems could pop up.

Required dependencies

SFS_CODE can be installed anywhere on the user’s machine. The path to the binary is supplied to sfs_coder (see the section on running SFS_CODE through sfs_coder).

Optional dependencies

  • mpmath (required for rescaled recurrent hitchhiking simulations)
  • scipy (required for rescaled recurrent hitchhiking simulations)

Importing sfs_coder’s modules

All of the tools to execute simulations and analyze command lines are in the command module.

from sfscoder import command

com = command.SFSCommand()

All of the tools to analyze the output of SFS_CODE simulations are in the sfs module.

from sfscoder import sfs

mut = sfs.Mutation()