MPUSP/snakemake-assembly-postprocessing

A Snakemake workflow for the post-processing of microbial genome assemblies.

Overview

Latest release: v1.2.0, Last update: 2026-04-17

Share link: https://snakemake.github.io/snakemake-workflow-catalog?wf=MPUSP/snakemake-assembly-postprocessing

Quality control: linting: passed formatting: passed

Topics: apptainer bacteria conda genome-assembly genome-sequencing microbes pipeline postprocessing quality-control snakemake-workflow genomics

Workflow Rule Graph

This visualization of the workflow’s rule graph was automatically generated using Snakevision

Rule Graph light

Deployment

Step 1: Install Snakemake and Snakedeploy

Snakemake and Snakedeploy are best installed via the Conda package manager. It is recommended to install conda via Miniforge. Run

conda create -c conda-forge -c bioconda -c nodefaults --name snakemake snakemake snakedeploy

to install both Snakemake and Snakedeploy in an isolated environment. For all following commands ensure that this environment is activated via

conda activate snakemake

For other installation methods, refer to the Snakemake and Snakedeploy documentation.

Step 2: Deploy workflow

With Snakemake and Snakedeploy installed, the workflow can be deployed as follows. First, create an appropriate project working directory on your system and enter it:

mkdir -p path/to/project-workdir
cd path/to/project-workdir

In all following steps, we will assume that you are inside of that directory. Then run

snakedeploy deploy-workflow https://github.com/MPUSP/snakemake-assembly-postprocessing . --tag v1.2.0

Snakedeploy will create two folders, workflow and config. The former contains the deployment of the chosen workflow as a Snakemake module, the latter contains configuration files which will be modified in the next step in order to configure the workflow to your needs.

Step 3: Configure workflow

To configure the workflow, adapt config/config.yml to your needs following the instructions below.

Step 4: Run workflow

The deployment method is controlled using the --software-deployment-method (short --sdm) argument.

To run the workflow using a combination of conda and apptainer/singularity for software deployment, use

snakemake --cores all --sdm conda apptainer

To run the workflow with automatic deployment of all required software via conda/mamba, use

snakemake --cores all --sdm conda

Snakemake will automatically detect the main Snakefile in the workflow subfolder and execute the workflow module that has been defined by the deployment in step 2.

For further options such as cluster and cloud execution, see the docs.

Step 5: Generate report

After finalizing your data analysis, you can automatically generate an interactive visual HTML report for inspection of results together with parameters and code inside of the browser using

snakemake --report report.zip

Configuration

The following section is imported from the workflow’s config/README.md.

Workflow overview

A Snakemake workflow for the post-processing of microbial genome assemblies.

  1. Parse samples.csv table containing the samples’s meta data (python)

  2. Annotate assemblies using one of the following tools:

    1. NCBI’s Prokaryotic Genome Annotation Pipeline (PGAP). Note: needs to be installed manually

    2. prokka, a fast and light-weight prokaryotic annotation tool

    3. bakta, a fast, alignment-free annotation tool. Note: Bakta will automatically download its companion database from zenodo (light: 1.5 GB, full: 40 GB)

  3. Create a QC report for the assemblies using Quast

  4. Create a pangenome analysis (orthologs/homologs) using Panaroo

  5. Compute pairwise average nucleotide identity (ANI) between the assemblies using FastANI and plot a phylogenetic tree based on the ANI distances.

Running the workflow

Input data

This workflow requires fasta input data. The samplesheet table has the following layout:

sample

species

strain

id_prefix

file

EC2224

“Streptococcus pyogenes”

SF370

SPY

assembly.fasta

Note: Pangenome analysis with Panaroo and pairwise similarity analysis with FastANI requires at least two samples.

Workflow parameters

The following table is automatically parsed from the workflow’s config.schema.y(a)ml file.

Parameter

Type

Description

Required

Default

samplesheet

string

Path to the sample sheet in CSV format

yes

config/samples.csv

tool

array

Annotation tool(s) to use

yes

[‘prokka’]

reference

yes

. fasta

string

Path to the reference genome in FASTA format

yes

. gff

string

Path to the reference annotation in GFF format (optional)

pgap

yes

. bin

string

Path to the PGAP script

yes

path/to/pgap.py

. use_yaml_config

boolean

Whether to use YAML configuration for PGAP

yes

true

. prepare_yaml_files

yes

. . generic

string

Path to the generic YAML configuration file

yes

config/generic.yaml

. . submol

string

Path to the submol YAML configuration file

yes

config/submol.yaml

prokka

yes

. center

string

Center name for Prokka annotation (used in sequence IDs)

yes

. extra

string

Extra command-line arguments for Prokka

yes

–addgenes

bakta

yes

. download_db

string

Bakta database type, one of ‘full’, ‘light’, or ‘none’ if existing is used

yes

light

. existing_db

string

Path to an existing Bakta database (optional)

yes

. extra

string

Extra command-line arguments for Bakta

yes

–keep-contig-headers –compliant

quast

yes

. extra

string

Extra command-line arguments for QUAST

yes

panaroo

yes

. skip

boolean

Whether to skip Panaroo analysis

false

. remove_source

string

Source types to remove in Panaroo (regex supported)

cmsearch

. remove_feature

string

Feature types to remove in Panaroo (regex supported)

tRNA

. extra

string

Extra command-line arguments for Panaroo

–clean-mode strict –remove-invalid-genes

fastani

yes

. skip

boolean

Whether to skip FastANI analysis

false

. extra

string

Extra command-line arguments for FastANI

Linting and formatting

Linting results
All tests passed!
Formatting results
All tests passed!