Installation¶
The genetest
module requires a Python version 3.4 or earlier. We
recommend using a Python virtual environment specifically for
genetest
.
Python virtual environment¶
The following command will create a virtual environment for Python named
genetest_venv
in your home directory. Note that in order to use the
environment, it requires to be activated.
# Creating the environment
python3 -m venv $HOME/genetest_venv
# Activating the environment
source $HOME/genetest_venv/bin/activate
Note
The text (gentest_venv)
will be added at the beginning of the terminal
prompt.
We recommend upgrading or installing some dependencies first.
pip install -U pip
pip install -U setuptools
pip install -U Cython
pip install -U numpy
Installing the modules¶
To install genetest
module and all its required dependencies, use the
following command (making sure the virtual environment is activated).
pip install genetest
The installation process should at least install the following dependencies.
geneparse
: parses multiple genotype file formats.pybgen
: parses BGEN files (used bygeneparse
).pyplink
: parses binary Plink files (used bygeneparse
).cyvcf2
: parses VCF files (used bygeneparse
).
Note
If you intend to parse BGEN files with the 1.3 format specifications (or
more recent), you will require the zstandard
module.
pip install zstandard
Testing the installation¶
To test the installation, you can perform the following commands.
python -m genetest.tests
python -m geneparse.tests
python -m pyplink.tests
python -m pybgen.tests