moments now supports Python 3. Because Python is soon discontinuing support for
Python 2, we do not actively ensure that moments remains fully compatable with Python
2, and strongly recommend using Python 3.
moments is available via Bioconda.
The most recent release of
moments can be installed by running
conda install -c bioconda moments
The conda channels must be set up to include bioconda, which can be done by running
conda config --add channels defaults conda config --add channels bioconda conda config --add channels conda-forge
A simple way to install
moments is via
are install requirements, but installing
moments directly from the git repository
pip should install these dependencies automatically:
pip install git+https://bitbucket.org/simongravel/moments.git
This approach can also be used to install the development branch of
pip install git+https://bitbucket.org/simongravel/moments.git@devel
Alternatively, you can clone the git repository
git clone https://bitbucket.org/simongravel/moments.git
and then from within the moments directory (
cd moments), run
pip install -r requirements.txt pip install .
Dependencies and details
moments.LD requires a number of dependencies. Minimally,
All dependencies are listed in requirements.txt, and can be install together using
pip install -r requirements.txt
We also strongly recommend installing
ipython for interactive analyses.
If you are using conda, all dependencies can be installed by navigating to the moments directory and then running
conda install --file requirements.txt
Once dependencies are installed, to install
moments, run the following commands
in the moments directory:
python setup.py build_ext --inplace python setup.py install
pip install .
Note that you might need sudo privileges to install in this way.
You should then be able to import
moments in your python scripts. Entering an
ipython or python session, type
import moments. If, for any reason, you have
moments after following these steps, please submit an
If you use
moments.LD, which reads VCF-formatted files and
computes LD statistics to compare to predictions from
moments.LD, you will need to