Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bacterial Hybrid Assembly Pipeline (Snakemake Version)

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.

Workflow Overview

  • Short-read QC - Trimming and quality filtering via fastp.
  • Long-read Filtering - Length and quality selection using filtlong with 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) and bwa mem (Illumina) mapped back to the polished assembly.
  • MultiQC - Aggregation of all quality control and assessment metrics into a single HTML report.

Setup & Installation

Prerequisites

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

Usage

  1. 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
  1. Configure your execution parameters in the config.yaml file (e.g., select genome_category among Small, Medium, Large, or Huge).
  2. Execute the pipeline using the following command:
snakemake --cores <number_of_threads> --use-conda

Offline Deployment (Air-Gapped Servers)

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.

Next Steps & Downstream Analysis

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:

1. Functional Annotation with Bakta

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.fa directly 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

2. Multi-Locus Sequence Typing (MLST) via Institut Pasteur

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.fa file 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

Citations

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).

License

This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.

Releases

Packages

Contributors

Languages