mmosmond / sparg

Estimating dispersal and locating genetic ancestors with genome-wide genealogies
GNU General Public License v3.0
3 stars 1 forks source link

NOTE: This is old software for inferring spatial histories from tree sequences. For the latest version of this software, see spacetrees: https://github.com/osmond-lab/spacetrees. The name sparg is now reserved for software that infers spatial histories from full ancestral recombination graphs: https://github.com/osmond-lab/sparg.

   sparg    s parg    sparg    s parg   sparg 
  spa  rg   sp   ar  sp   ar   spa     sp   ar
  spa       gs   pa  gs   pa   rg      gs   pa
    rgsp    rgspar   rg   sp   sp      rg   sp
      arg   gs       ar   gs   ar       argspa
  sp  arg   pa       pa   rg   gs           rg
   sparg    rg        spar g  parg      sparg

Estimating dispersal rates and locating genetic ancestors with genome-wide genealogies

This is the software. For the paper, see https://github.com/mmosmond/sparg-ms.

Installation

You can install using pip

pip install sparg

See the tutorial for a demo on how to use. You can run the tutorial directly in your browser with Binder. To run the tutorial locally you'll need to install a few dependencies, e.g., in the terminal run

python3 venv -m ~/.virtualenvs/sparg #make virtual environment
source ~/.virtualenvs/sparg/bin/activate #load virtual env
pip install -r requirements.in #install dependencies for tutorial (this is what Binder needs)
pip install jupyterlab #install jupyterlab
python -m ipykernel install --name=sparg #make virtual env available in jupyter
jupyter-lab tutorial/tutorial.ipynb #launch tutorial

Acknowledgements

Some code for importance sampling adapted from https://github.com/35ajstern/palm. Logo inspired by concrete poetry of bpNichol.