Repository navigation
docs: starting a DDA slice on an MS1 frame does not keep its first MS/MS frames - #104
Merged
Merged
Conversation
…/MS frames
`docs/utilities.md` said "Start the range at an MS1 frame to keep them." That is
false, and measured on `tests/data/example_dda.d` it is false for every range:
range starts on MS1 MS/MS in range dropped
18..40 yes 20 5 (19-23, parent MS1 7)
29..62 yes 30 5 (30-34, parent MS1 18)
7..40 yes 30 5 (8-12, parent MS1 1)
1..40 yes 35 0
19..40 no 20 15
The cause: the MS/MS frames after an MS1 frame are not all its own. 64 of the
65 MS1 frames are followed by ten PASEF MS/MS frames, and the first five of
those ten carry precursors detected in the *previous* MS1 frame; only frame 1
is different, with five MS/MS frames and all of them its own. So a range
starting at MS1 frame m always loses the five that belong to the MS1 frame
before m, m = 1 excepted.
The replacement states the actual rule - a PASEF MS/MS frame is dropped when
every one of its precursors was detected in an MS1 frame outside the range -
then that starting on an MS1 frame does not avoid it, with the three ranges
above, and that keeping a given MS/MS frame means including its precursors'
parent MS1 frame.
Checked and left alone: `slicer.py`'s docstring (:48-53) and warning (:160-161)
and the #101 CHANGELOG entry already say only the true thing, that a frame whose
precursors' MS1 frames are outside the slice is dropped and the range must be
widened to include them. Nothing else in the repo carried the false sentence.
Docs only, no behaviour change; both `llms-full.txt` copies regenerated.
ajs 3502 just check tdfpy: ruff=ok format=ok ty=ok pytest=ok, 878 passed, 11 skipped.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
The false sentence
docs/utilities.mdended its DDA-slice paragraph with "Start the range at an MS1 frame tokeep them." It is false, and not just in edge cases — it is false for every range I measured
except the one that starts at frame 1.
18..4029..627..401..4019..40Measured on
tests/data/example_dda.dby slicing into a temporary directory and reading theoutput's
Framestable, with the dropped set cross-checked against an independent predictionfrom
PasefFrameMsMsInfojoined toPrecursors.Parent— the two agreed on all five ranges.Why
The MS/MS frames that follow an MS1 frame are not all its own. Across the whole fixture, 64 of
the 65 MS1 frames are followed by ten PASEF MS/MS frames, and the first five of those ten carry
precursors detected in the previous MS1 frame. Frame 1 is the only exception: five MS/MS
frames, all its own. So a range starting at MS1 frame m always loses the five belonging to the
MS1 frame before m, and starting on an MS1 frame is simply not the lever the sentence claimed.
What it says now
The actual rule first — a PASEF MS/MS frame is dropped whenever every one of its precursors
was detected in an MS1 frame outside the range — then that starting on an MS1 frame does not
avoid it, with the three ranges above as evidence, then what does work: include the frame's
precursors' parent MS1 frame.
Everywhere else the claim could have been
docs/utilities.md:36llms-full.txt,docs/llms-full.txt--checkpassessrc/tdfpy/slicer.py:48-53(docstring)PasefFrameMsMsInforows; such frames are dropped" — no claim about where to startsrc/tdfpy/slicer.py:160-161(theTdfpyErrormessage)grepfor the sentence acrossdocs/,src/,llms-full.txtandCHANGELOG.mdnow returnsnothing.
Two corrections I made to my own first draft
Both caught by re-reading the code and the measurement rather than the draft:
followed by five. Now stated as 64 of 65, with frame 1 named as the exception.
orphaned[:10](slicer.py:297-302), so the text now says it lists up to the first ten.Gate
just check tdfpyfrom the workspace root through ajs, job 3502, exit 0:ruff=ok format=ok ty=ok pytest=ok [878 passed, 11 skipped, 7 subtests passed].Docs and docstrings only — no behaviour change, no test change, no version, heading, tag or
publish, and no other package touched.
🤖 Generated with Claude Code