Learn the steps of prokaryotic genome annotation by generating and comparing annotations with Prokka and Bakta. The tutorial also introduces EDGAR for comparative genome analysis, including core-genome, pan-genome and ortholog identification.
Overview
Time estimation: 2H
Version: main
Last update: 2026-08-31
Questions:Objectives:
How do I functionally annotate a bacterial genome using Prokka and Bakta, and what role does EDGAR play in comparative genomics?
Generate comprehensive genome annotations with Prokka and Bakta, and interpret differences in functional naming and hypothetical protein rates.
Explain how comparative genomics frameworks like EDGAR identify core genomes, pan-genomes, and unique singleton genes.
This tutorial demonstrates how to annotate a polished prokaryotic genome assembly using Prokka and Bakta, compare their annotation outputs, and briefly explore comparative genomics with EDGAR. It uses the genome assembly generated in the previous tutorial Assembly and assembly evaluation (hands-on) as the input for all analyses.
Prerequisites
- Please complete the Unix/Linux introduction tutorial before this tutorial.
- We assume you have successfully connected to an instance in the de.NBI cloud with the software pre-installed. Otherwise you will need to install the required tools on your own and make sure you have sufficient resources available.
- Throughout the course we assume you are working on data downloaded to a volume under
/vol/longread/, we create a link~/workdir/to that folder, if you are working somewhere else, adjust the~/workdirlink to that location and all commands should work as outlined in the course.- We also assume that you have a machine with 28 cores available, if not - adjust the commands that specify a certain number of threads / cores accordingly.
Once you have successfully assembled and polished a bacterial chromosome, it consists simply of a long, uncharacterized string of nucleotides (A, C, G, T). To make this data useful for biological research, you must perform genome annotation. This process involves identifying the structural features of the genome—such as protein-coding sequences (CDS), transfer RNAs (tRNAs), and ribosomal RNAs (rRNAs)—and assigning functional biological identities to them based on sequence similarity to known databases.
In this module, we will compare two popular tools used for this task:
Optional: How to install Prokka It’s quite complicated to install without conda/docker/singularity. Check out the github repository and use one of those methods.
Optional: How to install Bakta It’s quite complicated to install without conda/docker/singularity. Check out the github repository and use one of those methods.
We will run both annotators on our polished long-read assembly (flye_polished.fasta) and evaluate how their structural findings and functional naming conventions differ.
Step 1: Running Prokka Execute Prokka by specifying an output directory and a custom file prefix:
prokka --cpus 28 --outdir ~/workdir/prokka_output --prefix prokka_ont ~/workdir/polypolish/flye_polished.fasta
Don’t worry about the Could not run command: tbl2asn message if it appears. We don’t need the asn file.
Step 2: Running Bakta Unlike Prokka, Bakta relies on a separate, heavy database containing millions of curated proteins. For this workshop, this database has been pre-staged for you. Run Bakta using the following command:
conda activate bakta bakta --threads 28 --db ~/bakta_db/db-light --output ~/workdir/bakta_output ~/workdir/polypolish/flye_polished.fasta conda deactivate source ~/longread/bin/activate
Both tools generate various standardized outputs, including GFF3, GenBank, and FASTA files. To quickly benchmark their structural predictions, we can review the text-based summary logs (.txt) produced by each pipeline.
Step 3: Inspecting Summary Outputs Use
catto print out both overview profiles in your terminal:# View the Prokka summary report cat ~/workdir/prokka_output/prokka_ont.txt # View the Bakta summary report cat ~/workdir/bakta_output/bakta_ont.txt
Analyzing Annotation Discrepancies Look closely at the total counts of Coding Sequences (CDS), tRNAs, and rRNAs in both outputs. Are the numbers identical? If they differ, what could cause one tool to predict more genes than the other?
Solution Even though they use the same underlying software for core gene finding (Prodigal), the total counts often differ slightly. Bakta uses stricter structural filters and a much larger database, allowing it to accurately split overlapping reading frames, filter out false positive predictions, and identify specialized elements like pseudogenes or small non-coding RNAs that Prokka completely misses.
Step 4: Comparing Functional Descriptions A major difference lies in how specifically proteins are named. Let’s use
grepto check how many genes were left uncharacterized as “hypothetical protein” in both annotation suites:# Count hypothetical proteins in Prokka's GFF output grep -c "hypothetical protein" ~/workdir/prokka_output/prokka_ont.gff # Count hypothetical proteins in Bakta's GFF output grep -c "hypothetical protein" ~/workdir/bakta_output/bakta_ont.gff
Interpreting Naming Quality You will notice that Bakta significantly reduces the fraction of
hypothetical proteinlabels compared to Prokka. Thanks to its modern reference integration with UniProt and RefSeq, Bakta can assign definitive, functional gene names to sequences where Prokka could only find vague, outdated family matches.
Once individual genomes are annotated, the next logical milestone is to explore how multiple strains or species relate to one another. For this downstream phase, we shift from localized command-line annotation to web-based comparative genomics using EDGAR (Efficient Database framework for comparative Genome Analyses).
EDGAR is a fully automated high-throughput platform tailored for the deep comparative analysis of prokaryotic genomes. Users upload their fully annotated genome files (such as the .gff or GenBank files generated by Bakta) into public or password-protected private projects.
The underlying pipeline performs intensive all-versus-all sequence alignments across all selected strains. By evaluating BLAST Score Ratios (BSR), EDGAR accurately determines orthology relational paths to delineate specific genomic subsets:
Furthermore, EDGAR calculates average nucleotide identity (ANI) metrics and renders publication-ready visualizations, including Venn diagrams, UpSet plots, and synteny maps mapping gene order conservation across syntenic chromosomal layouts.
Key Points
Modern annotation systems like Bakta significantly reduce the rate of uncharacterized ‘hypothetical proteins’ by integrating curated, up-to-date RefSeq and UniProt cross-references.
Comparative workflows like EDGAR utilize BLAST Score Ratios (BSR) across multiple annotated genomes to instantly segregate the core genome from unique singleton genes.
Author(s): Nils Kleinbölting
Editor(s): Dilfuza Djamalova