git clone git@github.com:bacpop/beebop_py.git
You will need the GPS_v8 database, please download and extract it into /storage
:
./scripts/download_db
You will need Python installed, as well as Poetry, which you can get on Linux with
curl -sSL https://install.python-poetry.org | python3 -
To install PopPUNK v2.5, follow these steps:
First, create a new conda environment: conda create --name beebop_py python=3.9
and activate it with conda activate beebop_py
Then install PopPUNK to your computer:
pip3 install git+https://github.com/bacpop/PopPUNK#egg=PopPUNK
If there are problems installing PopPUNK, you may need to install one or more of the following packages with sudo apt get install
:
- cmake
- libhdf5-dev
- libeigen3-dev
- libopenblas-dev
Please install the dependencies for PopPUNK with:
conda install requests pandas networkx pp-sketchlib scikit-learn hdbscan biopython tqdm treeswift rapidnj
The graph-tool
and mandrake
packages must be installed from conda-forge
:
conda install -c conda-forge graph-tool mandrake
To install all other required dependencies go into the beebop_py project folder and run (having the conda environment 'beebop_py' activated)
poetry install
Start the flask app with
./scripts/run_app
In a second terminal, you can now query the flask endpoints, e.g.:
- /version
curl http://127.0.0.1:5000/version
Before testing, Redis and rqworker must be running. From the root of beebop_py, run (with 'beebop_py' env activated)
./scripts/run_test_dependencies
Testing can be done in a second terminal (make sure to activate 'beebop_py') by running
TESTING=True poetry run pytest