Visualizing Genome Assemblies with Bandage: Building from Source on Linux

🧬 Visualizing Genome Assemblies with Bandage (Built from Source)
Today’s post is all about Bandage β€” one of the most useful tools for inspecting genome assembly graphs.

Bandage reads the .gfa output files from assemblers like Flye, SPAdes, and Shovill, allowing you to:

  • Visualize contig connections
  • Detect circular genomes
  • Identify repeats and structural variations
  • Inspect gaps, coverage, node lengths
  • Export publication-quality images

When I started using hybrid assembly; I also explored their assembly graphs to confirm circularization and check for structural complexity and compare it with individual assemblies from Shovill (Illumina) and Flye (Nanopore).


πŸ”§ Why I Built Bandage from Source

The precompiled Bandage binaries often fail on modern Linux (Ubuntu 24.04), mainly due to:

  • missing Qt dependencies
  • incompatible system libraries
  • version mismatches

So I compiled Bandage manually using Qt 5.15, which is the most stable route for HPC/Linux users.


βš™οΈ Step 1 β€” Install Build Tools (Ubuntu)

sudo apt update
sudo apt install -y build-essential git libgl1-mesa-dev libxcb-xinerama0

These provide compilers, OpenGL libraries, and X11 components required for Qt applications.

βš™οΈ Step 2 β€” Install Qt SDK (Qt 5.15+ Required)

Bandage requires Qt version 5.15 or later, but Qt 6 is not compatible on all systems.

I installed Qt using the official online installer:

πŸ‘‰ https://www.qt.io/download-qt-installer

During installation:

  1. Selected Qt 5.15.x

  2. Enabled Desktop GCC 64-bit

  3. Installed Qt Creator + core libraries

This step is essential: Bandage will not build without a full Qt environment.

🧰 Step 3 β€” Open Project in Qt Creator

● Launch Qt Creator

● Open β†’ Bandage.pro from the cloned directory

● Click Configure Project

● Change build mode from Debug β†’ Release

● Click the green β–Ά (Run) button

● Qt Creator automatically compiles Bandage and launches the program.

🧬 Step 4 β€” Viewing Assembly Graphs

Flye and Shovill both generate .gfa files that Bandage can load:

● Flye β†’ assembly_graph.gfa

● Shovill/SPAdes β†’ contigs.gfa

To load a graph:

  1. Open Bandage

  2. File β†’ Load Graph

  3. Select your .gfa file

  4. Zoom, rotate, edit labels as needed

🧭 Summary

Today’s work:

βœ” Installed Qt + built Bandage from source

βœ” Loaded .gfa files from Flye & Shovill

βœ” Verified circular genomes

βœ” Inspected repeats and graph complexity

βœ” Exported clean visualizations for tomorrow’s analysis

Bandage remains an essential tool β€” especially when you need to see your assemblies rather than just trust metrics like N50.

Stay tuned!

Reference

https://github.com/rrwick/Bandage/wiki

see_your_genomes