Skip to content

Accept MAF input#86

Open
glennhickey wants to merge 2 commits intomainfrom
index
Open

Accept MAF input#86
glennhickey wants to merge 2 commits intomainfrom
index

Conversation

@glennhickey
Copy link
Copy Markdown
Contributor

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).

glennhickey and others added 2 commits April 29, 2026 16:11
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>
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.

1 participant