dev: standalone compare_tables.py (ASV-table jaccard/count equivalence)#58
Merged
Conversation
…lence) Pulls the table-equivalence check that bench_pooled.py only emits inside its WFA sweep CSV (jaccard_vs_nw / count_frac_vs_nw) into a standalone script so any two+ seqtab(_nochim).json runs can be compared directly — nw vs wfa arms, k5 vs k7, pool modes — without re-running a sweep. load_table/table_equiv are byte-for-byte identical to bench_pooled.py so numbers match that CSV exactly (verified on the PacBio pseudo sweep: e0 jac 0.9499/count 0.7309, e30 0.9989). Adds +only/-only ASV deltas and an optional --abundance filter mirroring MIN_ABUNDANCE. Complements compare_asvs.py (the richer churn/Hamming characterizer); this is the quick equivalence check. 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.
Summary
Pulls the ASV-table equivalence check that
bench_pooled.pycurrently only emits inside its WFA sweep CSV (jaccard_vs_nw/count_frac_vs_nw) into a small standalone script, so any two-or-moreseqtab(_nochim).jsonruns can be compared directly — nw vs wfa arms, k5 vs k7, pool modes — without re-running a sweep.load_table/table_equivare kept byte-for-byte identical tobench_pooled.py, so the numbers match that CSV exactly (verified on the PacBio pseudo sweep: e0 jaccard 0.9499 / count_frac 0.7309, e30 0.9989).Output
count_frac= the CSV'scount_frac_vs_nw(fraction of shared ASVs with identical per-sample counts).+only / -only= ASVs the comparison has that the baseline lacks / vice-versa (surfaces the over-call signature — e0 invents 94 ASVs the NW table lacks).--abundance Nrestricts to ASVs with total count >= N (mirrorsMIN_ABUNDANCE).Complements
compare_asvs.py(the richer abundance-stratified churn + nearest-neighbour Hamming characterizer); this is the quick jaccard/count equivalence check.Test plan
tmp/pb_k7_pseudo.--abundance Nand--abundance=Nforms parse correctly.🤖 Generated with Claude Code