Skip to content

Lab instrument exports: the 53 products allotropy converts (0.12.0) - #12

Merged
aaronkanzer merged 21 commits into
mainfrom
feat/instrument-exports
Nov 11, 2026
Merged

aaronkanzer merged 21 commits into
mainfrom
feat/instrument-exports

Conversation

@aaronkanzer

Copy link
Copy Markdown
Member

Adds the exports of the 53 instrument software products that allotropy converts to Allotrope ASM: plate readers, qPCR and dPCR, cell counters and solution analyzers, spectrophotometers, chromatography and electrophoresis, flow cytometry, multi-analyte profiling, surface plasmon resonance and liquid handlers. They live in seven family modules under scigantic_headers.instruments.

Each record names the product (instrumentSoftware, vendor), states what the file itself says (softwareVersion, instrumentModel, serialNumber, plateFormat, sampleCount, wavelengths, run date) and gives allotropyParser, the allotropy module that converts the file. Every golden case is a file from allotropy's own testdata (MIT, a NOTICE.md per family) checked against allotropy's expected output for that file.

Worth a reviewer's attention:

  • Content sniffers run before an extension's ordinary decoder. register_instrument_sniffer adds a per-extension list that has_decoder_for, read_for, decode_bytes and decode_source all try first. The existing decoder (BIDS json/tsv, the XML sidecars, EPU xml) still gets every file the sniffers decline, and the existing tests for those pass unchanged.
  • Newly registered extensions: .csv, .txt, .log, .xls, .xlsx, .xlsm, .zip, .wsp, .rslt, .blr and .bme. A file with one of these names that is not a known export now gets opened and declined, where before it was never opened. .log is there only for Biomek; every .log costs a 256 KiB read.
  • Workbooks and zips are read with stdlib zipfile over a bounded Source, capped at 16 MiB of seeking reads, so there are still no runtime dependencies.
  • One layout is ambiguous on purpose. VISIONlite and Genesys On-Board write the same fixed UTF-16 layout, so those files list both as candidates rather than guessing.
  • tests/test_instruments_registry.py decodes every family's cases through the public entry points and asserts each lands on its own product and no other, so a sniffer that over-claims another family's file fails there.

Version 0.12.0, CHANGELOG and README updated. 1398 passed, 3 skipped, on Python 3.9 and 3.12.

…tension's decoder

Instrument software writes .txt, .csv, .xml, .json and .xlsx, extensions other
decoders already claim. A sniffer registered with register_instrument_sniffer
recognizes one instrument's export from its bytes and declines anything else;
sniffers run before the extension's own decoder, which still gets every file
they decline. Adds shared text decoding (UTF-16 with and without BOM, cp1252)
and a stdlib .xlsx reader over a bounded Source for the family modules.
Recognize the exports of Vi-CELL XR (txt, xlsx, legacy xls), Vi-CELL BLU,
NucleoView, NC View, Revvity Matrix (csv, xlsx), Cedex HiRes (csv, xlsx),
Cedex Bio HT, PharmSpec (xlsx, HTML saved as xls, binary xls) and NovaBio
Flex2 by content. Reports software version, serial number, sample count and
identifiers (as written), run date and analytes where the file states them.

Golden cases are 26 real exports from allotropy's test data, checked against
the ASM allotropy writes for each. The generic-extension tests in
test_decoders and test_sources now use .md and .rtf, since .csv and .txt
have instrument sniffers.
…ImmunoSpot, Apex, Lunatic & Stunner)

Content sniffers for PerkinElmer Envision, Revvity Kaleido 2/3/3.5, MSD
Methodical Mind, MSD Discovery Workbench (csv and xlsx), CTL ImmunoSpot,
Mabtech Apex (xlsx) and Unchained Labs Lunatic & Stunner (csv and xlsx).
Golden cases are allotropy test exports, checked against the ASM allotropy
writes for each. The has_decoder_for and source-walk tests now use .md and
.rtf as their never-decoded extensions, since .csv and .txt have sniffers.
…oDrop, Qubit, Genesys)

Recognizes the VISIONlite, NanoDrop 8000, NanoDrop Eight, NanoDrop One,
Qubit 4, Qubit Flex, Genesys30 and Genesys On-Board exports by content and
reports application, wavelengths, sample count, serial number, software
version and run date where the file states them. The UTF-16 fixed layout
VISIONlite and Genesys On-Board both write names both as candidates.

Golden fixtures are allotropy's own test exports (MIT), cross-checked
against the ASM allotropy writes for each file. The generic decoder tests
now use .doc and .pptx as extensions with no decoder, since .csv and .txt
have instrument sniffers.
…lex Manager, Biomek and Echo exports

Sniffers for the flow cytometry, multi-analyte profiling and liquid handler
exports allotropy converts: FlowJo workspaces (.wsp/.xml), BD FACSDiva
experiment XML, Luminex xPONENT batch CSV, Luminex INTELLIFLEX flat results
CSV/XLSX and its xPONENT-style batch CSV, Bio-Rad Bio-Plex Manager XML,
Beckman Coulter Biomek transfer logs (.log/.csv), and Beckman Echo Plate
Reformat and Cherry Pick transfer reports.

Golden cases are allotropy test exports, cross-checked against the ASM
allotropy writes for them. test_decoders no longer uses .csv as the example
of an extension without a decoder, since instrument sniffers now claim it.
…iomni, Absolute Q, Qiacuity, CFX Maestro)

QuantStudio Real-Time PCR Software .txt and .xlsx, Design & Analysis .xlsx
(told apart from the Real-Time PCR layout by the Software Name and Version
key, or for 1.x by the trademark sign in the instrument type), Diomni
.xlsx, Absolute Q CSV and summary .zip, Qiacuity CSV and the CFX Maestro
Cq results CSV. Golden fixtures are allotropy test files; each case also
records allotropy's ASM values for the same file and the decode is checked
against them.

The has_decoder_for and sources tests used .txt and .csv as examples of
undecodable names; instrument sniffers now claim both, so they use .log
and .docx.
…ARS, SMART Control, Magellan, SkanIt)

Gen5 and Gen5 Image text exports are told apart by the read steps under
Procedure Details. SoftMax Pro is read in UTF-16 with or without a BOM.
SMART Control, Magellan and SkanIt are read from their .xlsx workbooks.
Golden fixtures are allotropy test inputs; expected values were checked
against allotropy's ASM output for the same files.

Two existing tests used .txt and .csv as examples of extensions with no
decoder; they now use .md and .rtf, since instrument sniffers claim .txt
and .csv.
Agilent OpenLab CDS result sets, Cytiva Unicorn result zips, the Benchling
Waters Empower and Thermo Fisher Scientific Chromeleon adapter JSON, Agilent
TapeStation Analysis XML, Cytiva Biacore T200 Control (.blr) and T200
Evaluation (.bme) OLE2 files, and Cytiva Biacore Insight .xlsx exports.

The JSON and XML exports parse the leading bytes with a truncation-tolerant
reader shared with scigantic-edge. The zip, OLE2 and .xlsx containers read
through the bounded Source. Golden cases come from allotropy's test data
(MIT, Benchling); the BIDS read assertion now allows the seekable read
instrument sniffers on .json request.
One README section for the seven instrument families: how the sniffers
dispatch, the shared field keys, allotropyParser, when counts and dates are
reported, and per family the products, formats, key fields, Python-only
forms and what each was checked against. The Limitations section gains the
instrument gaps. The 0.12.0 changelog lists the families, the extensions that
now have decoders, and the stdlib .xlsx reader.
@aaronkanzer
aaronkanzer merged commit 11ce3c8 into main Nov 11, 2026
3 checks passed
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