Accept MAF input#86
Open
glennhickey wants to merge 2 commits intomainfrom
Open
Conversation
Adds a BlockReader abstraction that sniffs MAF/TAF on open, reads the right header, and dispatches subsequent block reads -- including the alignment_link_adjacent call that MAF input needs for cross-block coordinate continuity. Migrates each tool's read loop to it, so users no longer need to pipe through 'taffy view' to consume a MAF. stats -b (sequence intervals) is no longer rejected on MAF input. Output formats per tool are unchanged for now -- pass 2 will make output mirror input where it makes sense. Adds unit tests for BlockReader plus a per-tool regression test that diffs direct-MAF invocation against 'taffy view -i x.maf | tool'. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Each migrated tool's `block_reader_open == NULL` path now releases the LI handle, the input FILE*, and (where applicable) the LW output writer before returning 1. Previously these leaked until process exit -- not observable in practice but worth fixing for hygiene. Also drops the redundant `if (r->header != NULL)` guard in block_reader_destruct since tag_destruct accepts NULL. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds abstraction layer over maf/taf reading, and use it in the various tools. Now you can run all the taffy tools on MAF inputs, rather than needing to pipe through taffy view. Output remains TAF by default (with some tools having maf output toggles).