Skip to content

fix: correctly set MA read length when making fibertig - #156

Merged
mrvollger merged 2 commits into
mainfrom
fix/fibertig-split-read-length
Nov 5, 2026
Merged

mrvollger merged 2 commits into
mainfrom
fix/fibertig-split-read-length

Conversation

@cademirch

Copy link
Copy Markdown
Contributor

ft pg-inject splits a contig into windows, but built each window's annotations with the full contig length, not its window size. this corrects that.

@mrvollger

mrvollger commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Was this issue new with the MA introduction?

@cademirch

Copy link
Copy Markdown
Contributor Author

Was this issue new with the MA introduction?

sort of. the alignment record was the right (window size) length, but with addition of MA tag, the read_length part of ma tag was being filled with total contig length, so an oversight.

BAM packs each CIGAR operation length into 28 bits. ft mock-fire and
pg-inject wrote one = (and H) op per record, so a span over 268,435,455 bp
wrapped silently and htslib could not read the record back ("CIGAR and
query sequence lengths differ"). Split long ops into several of the same
kind. union-peaks no longer needs its island length guard.

Fixes #155
@mrvollger
mrvollger merged commit 3ba4545 into main Nov 5, 2026
9 checks passed
@github-actions github-actions Bot mentioned this pull request Nov 5, 2026
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