Skip to main content

Crate openreadout_plate

Crate openreadout_plate 

Source
Expand description

Reader for microplate-reader exports: the text, CSV and XLSX files that plate-reader software writes for spreadsheets.

Dialects (docs/formats/plate-readers.md): Agilent BioTek Gen5, Molecular Devices SoftMax Pro (text exports and the binary .pda/.sda documents), BMG LABTECH MARS and SMART Control, PerkinElmer/Revvity EnVision and Kaleido, Tecan i-control and Magellan, Thermo SkanIt, and generic plate matrices. Provenance: docs/provenance/plate-readers.md. Every plate read is exposed as one long-form table (well,row,col,read,wavelength_nm,time_s,value), and export_asm writes a file as Allotrope Simple Model plate-reader JSON.

§Example

Every reader implements openreadout_core::FormatReader: descriptor says what it reads, sniff recognises a file from its first bytes, and open returns a openreadout_core::Dataset with a header-only info() summary and lazy data access.

use openreadout_core::FormatReader;
use openreadout_plate::PlateReader;

let format = PlateReader.descriptor();
assert_eq!(format.id, openreadout_plate::FORMAT_ID);
println!("{} ({}): .{}", format.name, format.family, format.extensions.join(", ."));

Reading a file:

use std::path::Path;

use openreadout_core::FormatReader;
use openreadout_plate::PlateReader;

let mut dataset = PlateReader.open(Path::new("absorbance.xlsx"))?;
let info = dataset.info()?; // headers only
let table = &info.tables[0];
println!("{} row(s) x {} column(s)", table.row_count, table.columns.len());
// The first 100 rows, column-major (`columns[c][r]`).
let rows = dataset.read_table(0, 0, 100)?;
for (column, values) in table.columns.iter().zip(&rows.columns) {
    println!("{}: {:?}", column.name, values.first());
}

Applications that accept any instrument file usually register every reader in an openreadout_core::Registry and let it detect the format; that is what the openreadout command-line tool does.

§API stability

The supported API is what this page documents. The parser modules are public only so that tests and fuzz targets can reach them: they are hidden from this documentation and may change in any release.

Structs§

AsmExportReport
Output of export --format asm.
PlateDataset
An opened plate-reader export.
PlateReader
The plate-reader export reader.

Constants§

ASM_MANIFEST
The ASM manifest our documents declare.
FORMAT_ID
Format id used on the command line and in JSON.
TABLE_COLUMNS
Columns of every plate table, in order.

Functions§

export_asm
Write ds as ASM JSON to output (temporary file, read back and verified, then renamed).