SMCSMC (Sequential Monte Carlo for the Sequential Markovian Coalescent) or SMC2 is a program for inferring population history from multiple genome sequences. It includes both a python package smcsmc
and a command line interface smc2
along with two backend binaries smcsmc
/scrm
.
For examples and explaination, please see the documentation online or in docs/
.
This repository contains two components, and both must be installed to properly use smcsmc
.
conda
NOTE: We currently only support
conda
installation on 64 bit Linux. If you are using a different operating system you must install manually -- see below.
We have automated this process in a conda
package, and we highly recommend installing it this way.
conda install -c conda-forge -c luntergroup smcsmc
We must add conda-forge
as a channel (with the -c
flag) because the Boost version there is more current than default channels.
Alternatively, a combination of cmake
and pip
can be used to install the python and core components:
git clone git@github.com:luntergroup/smcsmc.git git-smcsmc
cd git-smcsmc
git submodule init
git submodule update
Download and install the following packages (or use a package manager):
mkdir build; cd build
cmake ..
make
cd ..
pip install -r requirements.txt
pip install .
You can use smcsmc
through Docker, either by creating your own image or by using a pre-made one and mounting in your data. The docker image comes with both the python and C++ code pre-installed and ready to use.
docker run chris1221/smcsmc:latest
If you use smcsmc
in your work, please cite the following articles:
Henderson D, Zhu S, Cole CB, Lunter G (2021) Demographic inference from multiple whole genomes using a particle filter for continuous Markov jump processes. PLOS ONE 16(3): e0247647. https://doi.org/10.1371/journal.pone.0247647
Staab, P. R., Zhu, S., Metzler, D., & Lunter, G. (2015). scrm: efficiently simulating long sequences using the approximated coalescent with recombination. Bioinformatics, 31(10), 1680–1682. https://doi.org/10.1093/bioinformatics/btu861