Skip to content

Commit f457a1b

Browse files
committed
Implement contig→scaffold mapping in AlnFilterReader
Critical fix for .1aln filtering to match PAF output from ALNtoPAF. FastGA .1aln format stores alignment records using CONTIG IDs (regions without Ns), but PAF output requires SCAFFOLD IDs and scaffold-relative coordinates. Changes: - Add ContigInfo and ScaffoldInfo structures to store GDB skeleton data - Read GDB skeleton ('g', 'S', 'G', 'C' records) from .1aln files - Map contig IDs to scaffold IDs in read_alignment() - Adjust coordinates: scaffold_coord = contig.sbeg + contig_coord - Use scaffold names and lengths in PAF output This ensures .1aln→PAF conversion produces identical output to ALNtoPAF, enabling pure .1aln filtering without intermediate PAF conversion. Test results: - Read 18 scaffolds and 18 contigs from test GDB skeleton - Alignment names correctly show scaffold names, not contig IDs - All tests passing with contig→scaffold mapping
1 parent f612570 commit f457a1b

3 files changed

Lines changed: 582 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)