A reproducible, automated Snakemake workflow for hybrid de novo assembly of bacterial genomes, combining Oxford Nanopore (long reads) with Illumina (short reads).
This version leverages Conda for dynamic dependency isolation, ensuring maximum reproducibility across different computing environments without requiring manual installation of individual bioinformatic tools.
- Short-read QC - Trimming and quality filtering via
fastp. - Long-read Filtering - Length and quality selection using
filtlongwith dynamic genome size targets. - De Novo Assembly - Long-read assembly using
flye(--nano-hq). - Polishing - Hybrid error-correction using Illumina reads via
POLCA(MaSuRCA). - Evaluation - Assembly metrics generation against a reference using
QUAST. - Remapping & Coverage - Coverage verification using
minimap2(ONT) andbwa mem(Illumina) mapped back to the polished assembly. - MultiQC - Aggregation of all quality control and assessment metrics into a single HTML report.
You only need Conda (or Mamba) and Snakemake installed on your system. All other tools, including MultiQC, are automatically managed by the pipeline using the environment definitions inside the envs/ folder.
# Install Snakemake via Conda (if not already installed)
conda create -c conda-forge -c bioconda -n snakemake snakemake
conda activate snakemake
- Place your raw sequencing data inside a data/ directory using the following naming convention:
- Short reads: {sample}_R1.fq.gz and {sample}_R2.fq.gz
- Long reads: {sample}_nanopore.fq.gz
- Reference genome: {sample}.fasta
- Configure your execution parameters in the config.yaml file (e.g., select genome_category among Small, Medium, Large, or Huge).
- Execute the pipeline using the following command:
snakemake --cores <number_of_threads> --use-conda
If you need to deploy this pipeline on a secure cluster or server without internet access, you can pre-download and build all the environments (including MultiQC and mapping dependencies) on a connected machine first:
# 1. Download and build environments locally while online
snakemake --use-conda --conda-create-envs-only --cores 1
# 2. Pack the directory (including the hidden '.snakemake' folder)
# and transfer it to your offline server.
Once the pipeline completes successfully, you will obtain a polished, high-quality draft genome (results/{sample}/{sample}.PolcaCorrected.fa). To fully characterize your bacterial isolate, we recommend the following downstream analyses:
To predict genes, tRNA, rRNA, and functionally annotate your genome, Bakta is highly recommended due to its updated databases and antimicrobial resistance (AMR) gene detection. You can use it via the web interface or run it locally.
- Web Interface: Upload your
*.PolcaCorrected.fadirectly to the official Bakta Web Server. - Command-line Software: Clone the repository from OSF-Biolab/bakta and run it locally:
bakta --db /path/to/bakta_db --threads <threads> --output results/{sample}/annotation/ results/{sample}/{sample}.PolcaCorrected.fa
To identify the Sequence Type (ST) and clonal complex of your isolate for epidemiological tracking, you can use the official Institut Pasteur MLST databases.
- Web Interface: You can directly upload your
*.PolcaCorrected.fafile to the Institut Pasteur MLST Web Portal. - Command Line Alternative: Alternatively, you can use the command-line tool
mlst(by Torsten Seemann) which includes Pasteur schemes:
mlst results/{sample}/{sample}.PolcaCorrected.fa
If you use this pipeline in your research, please remember to cite Snakemake and the individual tools utilized in the workflow (links to publications can be found in their respective GitHub repositories).
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.