MPUSP/snakemake-assembly-postprocessing
A Snakemake workflow for the post-processing of microbial genome assemblies.
Overview
Latest release: v1.1.0, Last update: 2025-12-10
Linting: linting: passed, Formatting: formatting: passed
Topics: apptainer bacteria conda genome-assembly genome-sequencing microbes pipeline postprocessing quality-control snakemake-workflow genomics
Deployment
Step 1: Install Snakemake and Snakedeploy
Snakemake and Snakedeploy are best installed via the Conda. 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.1.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.
Parse
samples.csvtable containing the samples’s meta data (python)Annotate assemblies using one of the following tools:
NCBI’s Prokaryotic Genome Annotation Pipeline (PGAP). Note: needs to be installed manually
prokka, a fast and light-weight prokaryotic annotation tool
bakta, a fast, alignment-free annotation tool. Note: Bakta will automatically download its companion database from zenodo (light: 1.5 GB, full: 40 GB)
Create a QC report for the assemblies using Quast
Create a pangenome analysis (orthologs/homologs) using Panaroo
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 requires at least two samples.
Parameters
This table lists all parameters that can be used to run the workflow.
Parameter |
Type |
Details |
Default |
|---|---|---|---|
samplesheet |
string |
Path to the sample sheet file in csv format |
|
tool |
array[string] |
Annotation tool to use (one of |
|
pgap |
PGAP configuration object |
||
bin |
string |
Path to the PGAP script |
|
use_yaml_config |
boolean |
Whether to use YAML configuration for PGAP |
|
prepare_yaml_files |
Paths to YAML templates for PGAP |
||
generic |
string |
Path to the generic YAML configuration file |
|
submol |
string |
Path to the submol YAML configuration file |
|
prokka |
Prokka configuration object |
||
center |
string |
Center name for Prokka annotation (used in sequence IDs) |
|
extra |
string |
Extra command-line arguments for Prokka |
|
bakta |
Bakta configuration object |
||
download_db |
string |
Bakta database type ( |
|
existing_db |
string |
Path to an existing Bakta database (optional). Needs to be combined with |
|
extra |
string |
Extra command-line arguments for Bakta |
|
quast |
QUAST configuration object |
||
reference_fasta |
string |
Path to the reference genome for QUAST |
|
reference_gff |
string |
Path to the reference annotation for QUAST |
|
extra |
string |
Extra command-line arguments for QUAST |
|
panaroo |
Panaroo configuration object |
||
remove_source |
string |
Source types to remove in Panaroo (regex supported) |
|
remove_feature |
string |
Feature types to remove in Panaroo (regex supported) |
|
extra |
string |
Extra command-line arguments for Panaroo |
|
Linting and formatting
Linting results
All tests passed!
Formatting results
All tests passed!