Explain empty interfaces.csv instead of writing it silently (#17)#19
Merged
Conversation
When no interface row is produced for a run, process() wrote a zero-byte interfaces.csv (no header) and still logged "wrote .../interfaces.csv" with no error, making a genuine "no interface" result indistinguishable from a parse/load failure (issue #17). The common case for heterodimers is that AlphaFold placed the chains with no inter-chain contact within --contact_thresh (default 8 A, Cb-Cb), so no interface is detected and rows is empty. Track lightweight per-run diagnostics (models processed, interfaces found, interfaces dropped by --pae_filter) and emit a WARNING explaining why the CSV is empty and which knob to relax. File-write behavior is unchanged (still an empty file) for backward compatibility; only the logging improves. Add a regression test that runs the AF3 fixture with a sub-Angstrom contact_thresh and asserts the empty CSV plus the explanatory warning. Co-Authored-By: Claude Opus 4.8 <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.
Problem
Fixes #17. For a small fraction of AF3 heterodimer predictions,
process()produced a zero-byteinterfaces.csv(no header) while the log still saidwrote .../interfaces.csvwith no error. A genuine "no interface" result was indistinguishable from a parse/load failure.Root cause
AlphaJudge only emits interface rows for chain pairs with at least one inter-chain contact within
--contact_thresh(default 8 Å, Cβ–Cβ). When AlphaFold places the two chains with no contact at that cutoff,comp.interfacesis empty,rowsstays empty, and the old code wrote an empty file silently:This is reproducible on re-prediction because those models genuinely have non-contacting chains.
Fix
--pae_filter).rowsis empty, emit aWARNINGexplaining why the CSV is empty and which knob to relax (e.g.no inter-chain contacts within contact_thresh=8.0 A ... try a larger --contact_thresh).Test
Adds a regression test that runs the AF3 fixture with a sub-Ångström
contact_thresh, asserting the empty CSV plus the explanatory warning. Targeted runner tests pass (4 passed).🤖 Generated with Claude Code