Skip to content

Conversation

@mrvollger
Copy link
Member

@mrvollger mrvollger commented Jul 30, 2025

FiberTig Branch: PanGenome Support + Boundary Bug Fix

🎯 Overview

This PR introduces the first pangenome support to fibertools-rs while fixing a coordinate mapping bug (Issue #90). The changes add 3 new commands.

🐛 Bug Fix: Issue #90

Problem: Nucleosome/MSP coordinates at alignment block boundaries were incorrectly extended into subsequent blocks, causing artificial length inflation.

🚀 New Features: PanGenome Commands

1. pg-inject

Create mock BAM files from reference FASTA with perfectly aligned sequences while injecting annotation information from BED files.

3. pg-pansn

Add/strip panSN-spec prefixes from BAM contig names

  • Full panSN specification compliance
  • Bidirectional prefix management

2. pg-lift

Lift annotations through pangenome graphs from source to target coordinates

  • Coordinate transformation across pangenome references
  • Maintains annotation integrity during lifting
  • Uses vg + pg-pansn + pg-lift under the hood.

📦 New Core Architecture

Major New Modules

  • fibertig.rs (647 lines) - Core pangenome annotation framework
  • bamannotations.rs (573 lines) - BED annotation handling & coordinate mapping
  • panspec.rs (63 lines) - PanSN specification support

Enhanced Modules

  • bamlift.rs - Improved coordinate lifting with better error handling
  • bio_io.rs - Enhanced I/O capabilities (+114 lines)
  • fiber.rs - Major cleanup and simplification (-218 lines)

Removed Legacy Code

  • bamranges.rs (355 lines removed) - Replaced with more efficient implementations

Python (py-ft) Enhancements

  • fiberplot - Standalone CLI tool for generating Altair HTML visualizations
  • Updated dependencies and improved compatibility across the Python package

@mrvollger mrvollger marked this pull request as ready for review October 28, 2025 22:32
@mrvollger mrvollger closed this Oct 28, 2025
@mrvollger mrvollger deleted the fibertig branch November 6, 2025 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants