Welcome to the workshop of applying Neural Posterior Estimation in inferring historical population sizes!
Before we begin, ensure the following:
- Operating System: Linux/macOS/Windows (with WSL or an equivalent environment).
- Hardware:
- Only CPU is needed for this workshop.
- GPU usage will be provided in another Notebook.
- Software:
- Python 3.9+ sbi0.22.0.
- conda (or
venv
) for environment management. - Required Python libraries for this tutorial (requirements).
To run this notebook, please follow these steps:
- Install conda if you haven’t already.
- Clone the repository:
git clone https://github.com/fbaumdicker/ML-PopGen-Tutorials.git
and navigate to the NPEinPopGen directory. - Create the environment:
conda env create -f popgensbi.yml
- Activate the environment:
conda activate popgensbi
- Start notebook kernel:
python -m ipykernel install --user --name popgensbi --display-name "popgensbi"
- Launch Jupyter notebook:
jupyter notebook
. - In the Notebook, select the "popgensbi" kernel if prompted.
To run the Snakemake pipeline, please adjust the parameters in the config, and use the following command:
snakemake --use-conda --cores 4