Skip to content

test: yeast-tier differential in a minute, and a SAM agreement tool - #253

Open
BenjaminDEMAILLE wants to merge 1 commit into
mainfrom
test/yeast-tier
Open

test: yeast-tier differential in a minute, and a SAM agreement tool#253
BenjaminDEMAILLE wants to merge 1 commit into
mainfrom
test/yeast-tier

Conversation

@BenjaminDEMAILLE

Copy link
Copy Markdown
Contributor

Why

CONTRIBUTING.md's differential wants the whole ERR12389696 run. That is the right benchmark and the wrong thing to reach for when checking whether a stitcher change moved faithfulness, which is why "measure it on the yeast tier first" has been easy to skip.

test/yeast_tier.sh fetches a byte range instead: the first ~120 MB of each mate is 10 000 pairs, the reads are ordered so the mates still pair up, and the whole run takes about a minute including both index builds.

star    Uniquely mapped reads number | 7861   multiple loci | 574
rustar  Uniquely mapped reads number | 7860   multiple loci | 574

records compared: 16870   only in A: 2   only in B: 0
same chr/pos/CIGAR : 16614 (98.4825%)
same NH            : 16864 (99.9644%)

Two numbers, not one

test/sam_agreement.py reports position agreement and NH agreement separately, and that separation is the point: a tie broken differently from STAR moves the first and leaves the second alone, while a genuine regression usually moves both. Collapsing them into one percentage hides which of the two just happened.

It works on any two SAM files, so it is also usable against the nf-core fixture or a full run.

Where it came from

Investigating #31. I found the mechanism (STAR drops a transcript whose blocks are a subset of another in the same window and which scores lower; this codebase gates that check on the two transcripts having the same number of exons, and the offending variants have one fewer), implemented STAR's version, and this script is what showed the result: the tail disappears and faithfulness gets worse. Details on the issue, with the numbers. The change is not in this PR — only the tooling that measured it.

🤖 Generated with Claude Code

CONTRIBUTING.md's differential wants the whole ERR12389696 run, which is why
"measure it on the yeast tier first" has been easy to skip. This fetches a
byte range instead: the first ~120 MB of each mate is 10 000 pairs, the reads
are ordered so the mates still pair up, and the whole thing takes about a
minute including both index builds.

test/sam_agreement.py is the comparison itself, usable on any two SAM files.
It reports position agreement and NH agreement separately on purpose: a tie
broken differently moves the first and not the second, while a real regression
usually moves both, so one number cannot tell them apart.

Measured on main at 10 000 pairs: 7860 uniquely mapped against STAR's 7861,
98.48% of mates at the same chromosome, position and CIGAR, 99.96% with the
same NH.

Written while investigating #31, where it is what showed that a candidate fix
regressed faithfulness rather than improving it.
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