Repository navigation
Conversation
added 3 commits
November 9, 2026 16:07
Add a few focused tools that reduce the amount of code needed for everyday mzML analysis: - filter spectra by MS level, retention time, or polarity while reading - build extracted-ion chromatograms directly from a Reader - find the spectrum closest to a retention time without disturbing iteration - convert spectra and chromatograms into simple dictionaries for export, logging, or downstream analysis The new behaviour is backwards compatible. Retention-time information is indexed only when first needed, decoded arrays remain lazy unless requested, and existing Reader access continues to work as before. Also fix several small reliability issues: - allow empty chromatograms without failing - give each new Spectrum its own XML element - keep peak reduction within the available data - handle native spectrum identifiers correctly - close Reader resources more safely - provide a sensible version fallback for source checkouts Add tests for the new workflows and corrected edge cases. Validation: - 143 tests passed - 3 tests skipped - 8 subtests passed - documentation build completed successfully
Keep the new Reader features easier to follow by moving filter validation, spectrum matching, and retention-time indexing decisions into small named helpers without changing their behaviour. Make the regression tests clearer by comparing two named Spectrum instances and expecting the precise KeyError raised for an unknown indexed spectrum. Addresses all five open SonarCloud findings on PR 418.
Put the calculated noise estimate before its expected reference value, matching unittest conventions and the rest of the test file.
|
Member
|
Thanks for you contribution! |
This branch has not been deployed
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.



Added a few focused tools that reduce the amount of code needed for everyday mzML analysis:
The new behaviour is backwards compatible. Retention-time information is indexed only when first needed, decoded arrays remain lazy unless requested, and existing Reader access continues to work as before.
I have also fixedd a few small issues:
I have added tests for the new workflows and corrected edge cases.
Validation: