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:
-
Selected Qt 5.15.x
-
Enabled Desktop GCC 64-bit
-
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:
-
Open Bandage
-
File β Load Graph
-
Select your .gfa file
-
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
