labparse
One parser for lab instrument exports. Point it at the file your plate reader, spectrometer, or other bench instrument spat out, and get back a tidy table: one row per reading, with well, row, column, cycle, time in seconds, and value.
import labparse
result = labparse.parse("growth.asc")
result.data # tidy pandas DataFrame
result.wide() # one column per well
result.save_csv("tidy.csv")
labparse growth.asc --out tidy.csv
labparse kinetic.txt --wide
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.
- When labparse meets a format it does not know, it shows the raw file to your own LLM once, and the LLM writes a new recipe.
- The recipe is only accepted if it actually parses your file. A wrong recipe is rejected and retried, it can never silently produce bad data.
- Accepted recipes are cached in
~/.labparse/recipes, so each format costs at most one LLM call ever, and cached formats parse offline.
No LLM configured? Everything with a bundled or cached recipe still works, unknown formats give a clear message instead.
Bundled formats
- Tecan plate reader ASCII exports (
.asc, repeated well grids) - Molecular Devices SoftMax Pro / SpectraMax kinetic exports (
.txt) - Generic wide tables, CSV or TSV, with one column per well
- Generic long tables, CSV, with a well column and a value column
- Excel workbooks containing a well header row or a plate grid (
pip install labparse[excel])
Recipes are plain JSON. You can read them, edit them, share them with your lab, and drop new ones into the recipe folder. labparse --list-recipes shows everything installed.
Bring your own model (for learning new formats)
labparse looks for a language model in this order and uses the first one it finds:
claudeCLI (an active Claude Code login)codexCLIANTHROPIC_API_KEYOPENAI_API_KEY(setOPENAI_BASE_URLfor any OpenAI compatible server)
Control it with --llm off, --llm claude, or the LABPARSE_LLM environment variable.
Install
pip install labparse
Excel support: pip install labparse[excel]
Output columns
| column | meaning |
|---|---|
| well | normalized well id, A1 to P24 |
| row | plate row letter |
| col | plate column number |
| cycle | reading number in file order, starts 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.
Author
Built by Paul Crinigan, AI Apps API. Part of the free science tools collection at learnhowtoscience.com.
MIT licensed.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file labparse-0.1.0.tar.gz.
File metadata
- Download URL: labparse-0.1.0.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28f2ce5ff56832d1cab573dfed7b29a265e30173cc255830c2a14d97c8b1ff61
|
|
| MD5 |
e07abf80de1a8de500cc92ec2ff2709f
|
|
| BLAKE2b-256 |
924f6aae67d3eb293d54bce874f5f6f1e2004cb9a0be824db452bcdd6a69e022
|
File details
Details for the file labparse-0.1.0-py3-none-any.whl.
File metadata
- Download URL: labparse-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9797ac0db35193f00ca67e59b8fa3d72390bd3487f48ea708d0b4bca6797f81f
|
|
| MD5 |
9f7984390bb0ab60edddb734a5811dc0
|
|
| BLAKE2b-256 |
fa35f5a4e8f7325108023c07cbb9aba614d6beaa7d0eff52d473ee55dfb927cc
|