Repository navigation
Fix KLB data offset, FCS 3.2 and long TEXT, mzML model, BDV descending patterns (0.7.1) - #6
Merged
Merged
Conversation
…g patterns
- KLB: dataOffset now counts the block offset table (319 + 8 per block). On
the OME sample img.klb it is 447, where the first bzip2 block starts.
- FCS: accept FCS3.2; read 1 MiB; decode a TEXT segment longer than the read
as far as it goes and set textTruncated instead of returning None.
- mzML: follow referenceableParamGroupRef to the instrument model (msconvert
output), skip the serial number, and never take the model from the
component list, which reported the ion source as the instrument.
- BDV XML: a timepoint range ending below its start counts down, as spimdata
does.
- tests: a module-level importorskip("flowio") skipped every FCS test when
flowio was missing; it now skips only the flowio cross-check.
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.
Bugs found by cross-checking these decoders against other readers. The FCS, mzML and BDV fixes match Scigantic/scigantic-edge#12.
KLB
dataOffsetwas 319, the end of the fixed header. The KLB header is followed by a uint64 offset table with one entry per block, so the blocks start at 319 + 8 x the block count. On the OME sampleimg.klb(2 x 2 x 4 = 16 blocks), that is 447. A bzip2 stream (BZh) starts at byte 447, and 447 plus the table's last end offset is the file size, 382,141 bytes. The golden fixture andtest_real_sample_valuesasserted 319 and are updated.FCS
textTruncatedis set.mzML
The instrument model was the first cvParam in the instrument configuration. In msconvert output that is the ion source ("electrospray ionization"), because msconvert keeps the model in a
referenceableParamGroup. The decoder now follows the reference, skips the serial number and customization params, and never reads the model from the component list. On 54 real and test mzML files, 8 now report the right model, and none change otherwise.BigDataViewer XML
A pattern range ending below its start, such as
9-4, counts down the way spimdata'sIntegerPatterndoes, instead of reading as unknown. The existing3-1case asserted None and now expects 3.Tests
tests/test_fcs.pyended with a module-levelpytest.importorskip("flowio"), which skipped every FCS test in the file whenever flowio was missing. It isn't in the dev extras, so those tests did not run by default. The skip now covers only the flowio cross-check.The suite goes from 452 to 479 passed (2 skipped). The 11 new or changed checks fail on main. With flowio installed, all 21 FCS tests pass.
CHANGELOG has an Unreleased entry. The version is not bumped.