Skip to content
G-rox-yPublic

About

3D Interactive Visualization for Genome Fragment Assembly Graphs (GFA)

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

124 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DAGReader

DAGReader showcase video

3D Interactive Visualization for Genome Assembly Graphs (GFA)

DAGReader is a desktop bioinformatics tool that reads Graphical Fragment Assembly (GFA) files and renders the underlying assembly graphs in three dimensions. It is inspired by Bandage but built from the ground up as a native 3D viewer with real-time layout, selection, and exploration.

LicenseC++CMake

Why DAGReader?

Genome assembly graphs can be massive, tangled, and difficult to reason about in 2D alone. DAGReader uses the GRIP (Graph dRawing with Intelligent Placement) algorithm to compute a 3D layout that you can fly through, inspect, and query interactively. Segments and links are rendered as Bézier tubes with full camera control, selection, and search.

The code has been optimized for efficiency and works well for large graphs.

Note

This project is under active development.

Features

  • Native 3D rendering — Vulkan pipeline with compute-shader mesh generation; edges are drawn as curved 3D tubes, not flat lines.

  • GRIP layout engine — Multi-scale force-directed placement (Kamada–Kawai + Fruchterman–Reingold) accelerated with OpenMP.

  • GFA v1.0 support — Parses segments, links, containments, and paths. Optional minimal memory mode skips large optional fields to help fit huge graphs in RAM.

  • Interactive GUI (Dear ImGui) — Fully controllable side panel with:

    • Live layout parameter tuning (rounds, temperature, scaling)

    • Appearance controls (colors, widths, randomization)

    • Subgraph visibility & selection tables

    • Search by name (strict + fuzzy) across segments, links, paths, and containments

    • Dynamic coloring of segments by their properties (depth/length)

  • Selection & inspection — Click to select segments/links; view metadata, sequence data, and CIGAR strings in floating HUDs.

  • Camera controls — Free-fly, pan, rotate, zoom, and orbit around selections.

  • Linux & Windows compatible — macOS planned down the line.

Quick Start

Dependencies

You only need CMake, git, a C++20 compiler, a GLSL validator and the Vulkan loader + headers (libvulkan-dev). All other dependencies (GLFW, vk-bootstrap, VulkanMemoryAllocator, GLM, Dear ImGui, nativefiledialog-extended, spdlog, inipp) are fetched automatically via CMake FetchContent.

Platform Install command
Debian / Ubuntu sudo apt update && sudo apt install cmake git build-essential libomp-dev
Fedora sudo dnf install cmake git gcc-c++ libomp-devel
Arch sudo pacman -Syu cmake git base-devel openmp

Build

git clone https://github.com/G-rox-y/DAGReader.git
cd DAGReader

# Release build (recommended)
cmake -B build -S . -G "Ninja" -DCMAKE_BUILD_TYPE=Release
cmake --build build -j

Note

if the cmake step fails due to some missing dependencies, check out the Full Dependency Reference

Run

./build/DAGReader

Windows Build (MSYS2)

  1. Install MSYS2 and open the UCRT64 shell.

  2. Update the environment: pacman -Syu

  3. Install toolchains and Vulkan dependencies:

    pacman -S --needed git mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-ninja
    pacman -S --needed mingw-w64-ucrt-x86_64-vulkan-loader mingw-w64-ucrt-x86_64-vulkan-headers mingw-w64-ucrt-x86_64-glslang
  4. Build:

    cd /c/path/to/DAGReader
    cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
    cmake --build build -j
    ./build/DAGReader.exe

Full Dependency Reference

If the minimal install above fails during the CMake configuration step, your system is likely missing the OS-level graphics, windowing, or desktop-integration libraries that cannot be fetched automatically.

What you need and why

Requirement Needed by Typical package names
CMake ≥ 3.24 Build system cmake
Git Fetching dependencies git
C++20 compiler The project itself build-essential, gcc-c++
OpenMP (optional) GRIP layout acceleration libomp-dev(Debian) , libomp-devel(Fedora), openmp (Arch)
pkg-config / pkgconf NFD, GLFW discovery pkg-config(Debian), pkgconf-pkg-config(Fedora), pkgconf (Arch)
Vulkan loader + dev headers Vulkan rendering libvulkan-dev, vulkan-loader-devel, vulkan-tools (or the LunarG Vulkan SDK)
Vulkan driver (runtime) Vulkan ICD / GPU driver for execution mesa-vulkan-drivers (Debian/Fedora), vulkan-intel/vulkan-radeon (Arch).
glslangValidator Compiling GLSL to SPIR-V at build time glslang-tools (Debian), glslang (Fedora/Arch), or the LunarG Vulkan SDK
X11 development libraries GLFW on X11 libxrandr-dev, libxinerama-dev, libxcursor-dev, libxi-dev
Wayland dev libraries (optional) GLFW on Wayland libwayland-dev, wayland-protocols
GTK3 development files nativefiledialog-extended (file dialogs on Linux) libgtk-3-dev(Debian), gtk3-devel(Fedora), gtk3 (Arch)

Per-distro copy-paste commands

Use the block that matches your distribution if the Quick Start table was insufficient.

Debian / Ubuntu / Mint

sudo apt update && sudo apt install -y \
  cmake git build-essential libomp-dev \
  pkg-config libvulkan-dev glslang-tools mesa-vulkan-drivers \
  libgtk-3-dev \
  libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxkbcommon-dev \
  libwayland-dev wayland-protocols

Fedora

sudo dnf install -y \
  cmake git gcc-c++ libomp-devel \
  pkgconf-pkg-config vulkan-loader-devel vulkan-tools glslang mesa-vulkan-drivers \
  gtk3-devel \
  libXrandr-devel libXinerama-devel libXcursor-devel libXi-devel libxkbcommon-devel \
  wayland-devel wayland-protocols-devel

Arch / Manjaro

sudo pacman -Syu --needed \
  cmake git base-devel openmp \
  pkgconf vulkan-tools vulkan-headers glslang vulkan-intel vulkan-radeon \
  gtk3 \
  libxrandr libxinerama libxcursor libxi libxkbcommon \
  wayland wayland-protocols

Technical Overview

  • Renderer: Custom Vulkan backend. A compute shader tessellates each Bézier edge into a variable-width 3D tube mesh (vertices + indices), which a simple vertex/fragment pair then rasterizes. Edges are rendered as curved 3D tubes with normal-based lighting hints computed in the compute shader.

  • Layout: GRIP builds a hierarchy of filtered graphs and places vertices from coarse to fine, combining Kamada–Kawai neighborhood forces with Fruchterman–Reingold repulsion. Parameters are exposed in the UI for experimentation.

  • Threading: Multi-threaded architecture with a dedicated window/render thread and a controller thread that handles file I/O, parsing, and layout computation.

  • Parser: Hand-written GFA parser with strict validation warnings. Can perform reverse-lookup by name, fuzzy matching, and on-demand sequence/CIGAR streaming.

License & Credits

DAGReader is licensed under the zlib License.

Created by Petar Dušević with mentorship from Krešimir Križanović.

Acknowledgments

The existence of the following open-source projects has greatly helped in the creation of DAGReader:

Project Purpose
GLFW Windowing and input handling
Vulkan Cross-platform 3D graphics/compute API
vk-bootstrap Vulkan instance/device/swapchain bootstrap
VulkanMemoryAllocator GPU memory allocation
GLM Graphics math library
Dear ImGui Immediate-mode GUI
nativefiledialog-extended Cross-platform native file dialogs
spdlog Fast C++ logging
inipp Simple INI file parsing

The embedded UI font is Roboto Medium, distributed alongside Dear ImGui. Optional multi-threading support is provided by OpenMP.

Get involved

The codebase has been written in a way that tries to minimize the amount of code while trying to keep things readable and manageable for the developer, this is done to invite contribution and should be respected in any pull requests.

If you have ideas, issues, or want to collaborate, feel free to open a ticket or a pull request.

About

3D Interactive Visualization for Genome Fragment Assembly Graphs (GFA)

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages