Metagenomic and genomic surveillance of antimicrobial resistance in hospital wastewater (ATTACK-AMR) Analysis Pipeline
The cooperative research project ATTACK-AMR aims to deliver alternative, non-antibiotic therapies to combat antimicrobial resistant (AMR) pathogens. AMR is one of the biggest challenges facing healthcare industries and is on a rapid rise as a result of the overuse of antibiotics. Replacing antibiotics with alternative products will delay the resistance and restore the activity of antibiotics that are no longer effective due to resistance.
This serves as a guide to run the analysis pipeline written in two versions, [1] Snakemake and [2] Workflow Description Language (WDL).
This Snakemake pipeline requires the package manager Conda and the workflow management system Snakemake. Additional dependencies not handled by Snakemake are described in Section 1.3.
$ curl -sL \
"https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh" > \
"Miniconda3.sh"
$ bash Miniconda3.sh
$ conda update conda
$ rm Miniconda3.sh
$ conda install wget
$ conda config --add channels conda-forge
$ conda update -n base --all
$ conda install -n base mamba
$ mamba create -c conda-forge -c bioconda -n snakemake snakemake
This creates an isolated enviroment containing the latest Snakemake. To activate it:
$ conda activate snakemake
To test snakemake:
$ snakemake --help
Install git and gawk. We require gawk to process the filtering stage of our databases.
$ mamba install git
$ mamba install gawk
Download ATTACK-AMR from the online repository, or using the command line:
$ git clone https://github.com/bioinfodlsu/attack_amr_pipeline
The pipeline requires, at the very least: (1) Metagenomic sequences (sample sequences can be downloaded at ENA, and (2) reference protein databases for (Resfinder, MGE). These and other input parameters are specified via a YAML-format config file -- config.yaml is provided in the config folder.
After constructing a config.yaml file and with the snakemake conda environment activated, you can call the pipeline from the top-level directory of ATTACK-AMR:
$ cd attack_amr_pipeline
$ snakemake --use-conda --cores all
Outputs are stored the top-level directory of ATTACK-AMR.
If working on a non-Linux machine, the following installation guidelines will work using WSL software in your local Windows machine.
Follow installation guidelines at https://miniwdl.readthedocs.io/en/latest/getting_started.html.
pip3 install miniwdl
conda install -c conda-forge miniwdl
Then open a command prompt and try,
miniwdl run_self_test
…to test the installation with WDL's built in workflow. This should end with miniwdl run_self_test OK.
- Update the apt package index.
sudo apt-get update
- Install docker engine.
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
- Verify that the Docker Engine installation is successful by running the hello-world image.
sudo docker run hello-world
- Activate docker daemon.
sudo dockerd
- Run the miniWDL test script on a separate command prompt.
miniwdl run_self_test
You can choose to run the miniWDL through your command prompt.
- Check your WDL Script for any errors.
miniwdl check main.wdl --no-shellcheck
- If no errors are detected, run your pipeline. Note: Place all your input files in one json file.
miniwdl run main.wdl --input inputs.json
These are the steps to run it via Jupyter Notebook.
- Install Jupyter Notebook.
pip install jupyterlab
- Run Jupyter Notebook.
jupyter-lab
- Run the WDL Script via Jupyter's terminal.
miniwdl check main.wdl --no-shellcheck
miniwdl run main.wdl --input inputs.json