labparse: One Parser for Lab Instrument Exports
On This Page
Install
pip install labparse
Excel workbook support is an optional extra:
pip install labparse[excel]
Using labparse
From Python, parsing is one call, and the result carries the tidy data as a pandas DataFrame:
import labparse
result = labparse.parse("growth.asc")
result.data # tidy pandas DataFrame
result.wide() # one column per well
result.save_csv("tidy.csv")
From the command line, the same thing:
labparse growth.asc --out tidy.csv
labparse kinetic.txt --wide
The tidy layout, one row per reading, is the shape that pandas, R, and every statistics tool actually wants. The wide layout, one column per well, is the shape most spreadsheet workflows expect. labparse gives you both from the same parse.
The Trick: Formats Are Learned Once, Then Free Forever
Every instrument exports its own hostile format, and most labs end up writing throwaway parsing scripts for each one. labparse works differently.
Known formats parse instantly using bundled recipes, small JSON descriptions of a format that a deterministic engine executes. No AI is involved in parsing, ever, the engine just follows the recipe.
When labparse meets a format it does not know, it shows the raw file to your own AI model once, and the model writes a new recipe. The recipe is only accepted if it actually parses your file. A wrong recipe is rejected and retried, so it can never silently produce bad data. This verification step matters: the model proposes, the deterministic engine disposes, and your numbers only ever flow through the engine.
Accepted recipes are cached locally in your home directory, so each format costs at most one AI call ever, and cached formats parse offline. Recipes are plain JSON. You can read them, edit them, share them with your lab, and drop new ones into the recipe folder. Running labparse --list-recipes shows everything installed.
No AI model configured? Everything with a bundled or cached recipe still works, and unknown formats give a clear message instead of a wrong guess.
Bundled Formats
Out of the box, labparse reads: Tecan plate reader ASCII exports with repeated well grids, Molecular Devices SoftMax Pro and SpectraMax kinetic exports, generic wide tables in CSV or TSV with one column per well, generic long tables in CSV with a well column and a value column, and Excel workbooks containing a well header row or a plate grid (with the excel extra installed).
Anything else becomes a learned recipe the first time you meet it.
Output Columns
Every parse produces the same schema, whatever the instrument:
| Column | Meaning |
|---|---|
| well | normalized well id, A1 to P24 |
| row | plate row letter |
| col | plate column number |
| cycle | reading number in file order, starting at 1 |
| time_s | seconds, parsed from h:mm:ss or numeric time fields, NaN when the format has no time |
| value | the measurement |
Extra columns from the instrument, like temperature, are kept alongside these.
Bring Your Own AI Model
For learning new formats, labparse looks for a model in this order and uses the first one it finds: the Claude command line tool (an active Claude Code login), the Codex command line tool, an Anthropic API key, then an OpenAI API key, where setting a base URL points it at any OpenAI compatible server, including local models.
You can control it explicitly with --llm off, --llm claude, or the LABPARSE_LLM environment variable.
Get the Code
labparse is free, open source, and MIT licensed, built by Paul Crinigan at AI Apps API. The source, issue tracker, and README live at github.com/AIAppsAPI/labparse. If your instrument's export defeats it, open an issue and attach a sample file, that is exactly the kind of format the recipe system exists to swallow.
It is part of our growing collection of free AI science tools, alongside statsage, which takes tables like the ones labparse produces and runs the correct statistical analysis on them, and Literature Radar for monitoring new papers.