This repository contains the official python implementation of the paper - https://doi.org/10.1101/2022.07.07.499154
Dataset download link -> Google Drive
## create new environment
conda create -n qpm_env python=3.6
source activate qpm_env
## Adding new environment to JupyterLab
conda install -c anaconda ipykernel -y
python -m ipykernel install --user --name=qpm_env
conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=11.1 -c pytorch -c nvidia
conda install -c conda-forge matplotlib
conda install -c conda-forge wandb
#install remaining packages through pip
pip install -r requirements.txt
- Modules - supporting python library
- Notebooks - different experiments
Classification Task | Training Notebook | Saved Model | N bacteria grouped evaluation |
---|---|---|---|
Gram Stain Classification | Notebook | link | Notebook |
Antibiotic Resistance Prediction | Notebook | link | Notebook |
Species Level Classification | Notebook | link | Notebook |
Strain Level Classification | Notebook | link | Notebook |
After downloading pretrained models and test dataset, you can edit the path
in the python scripts below and the dataloader.py using data_dir
variable.
Specify the concentration level (N) to be used for prediction in the line below,
Eg. running for N = 3, replace the line with,
for N in [3]:
- Antibiotic Resistance - verify_arp.py
- Gram Stain Classification - verify_gram.py
- Species Classification - verify_species.py
- Strain Classification - verify_strain.py