Back to Skills

instrument-data-to-allotrope

Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV. Use this skill when scientists need to standardize instrument data for LIMS systems, data lakes, or downstream analysis. Supports auto-detection of instrument types. Outputs include full ASM JSON, flattened CSV for easy import, and exportable Python code for data engineers. Common triggers include converting instrument files, standardizing lab data, preparing data fo

23,167stars2,782forksUpdated 7/30/2026

Security Assessment

Safe(93/100)
Security Score93/100

About instrument-data-to-allotrope

instrument-data-to-allotrope is a data-engineering skill that converts laboratory instrument output files (PDF, CSV, Excel, TXT) into the standardized Allotrope Simple Model (ASM) JSON format or a flattened 2D CSV. It addresses the common problem of heterogeneous, vendor-specific instrument exports that must be normalized before they can be uploaded to LIMS or ELN systems, loaded into data lakes, or handed to downstream analysis. It supports auto-detection of instrument types and can also emit exportable Python parser code for data engineers to use in production pipelines.

The workflow detects the instrument type from file contents, parses using the allotropy library (or a flexible fallback parser), and generates three kinds of output: full ASM JSON with semantic ontology URIs, a flattened CSV where each measurement becomes a row with repeated metadata, or both. It carefully separates raw measurements (placed in the measurement document) from calculated or derived values (placed in the calculated-data aggregate document with traceability back to their data sources), and documents common calculated fields by instrument type such as viability percentage, concentration ratios, and DIN/RIN. It ships reference guides (ASM schema overview, field classification, flattening, supported instruments) plus scripts for conversion, parser export, flattening, and validation, and it always validates ASM output before delivery. The skill is explicitly presented as an example that organizations can customize by editing the reference files, connecting an MCP server to internal schema systems, or extending the scripts for proprietary formats.

It targets scientists and data engineers in bio-research and lab environments who need reproducible, standards-compliant data transformation. Typical use cases include preparing instrument data for LIMS/ELN upload, standardizing lab data for a data lake, and generating parser code for production ingestion pipelines. It is licensed under Apache 2.0.

FAQ

What input and output formats are supported?

It ingests laboratory instrument files in PDF, CSV, Excel, and TXT form and outputs full ASM JSON with ontology URIs, a flattened 2D CSV, or both, plus optional exportable Python parser code for data engineers.

What libraries does it rely on?

It uses the allotropy library for native parsing (with a flexible fallback parser), along with pandas, openpyxl, and pdfplumber, which the Quick Start installs via pip.

How does it handle raw versus calculated data?

Raw instrument readings go into the measurement document, while calculated or derived values go into the calculated-data aggregate document and must include traceability via a data-source aggregate document. A field classification reference guides ambiguous cases.

Is this a finished product or a starting template?

It is explicitly an example skill. Organizations are expected to customize the reference files with their own schemas, connect an MCP server to internal systems, or extend the scripts to handle proprietary instrument formats.

Does it validate its output?

Yes. The skill instructs always validating the ASM output against Allotrope schemas before delivering results to the user, and it ships a validation script for that purpose.

All Files

11 files
LICENSE.txt10.0 KB
View
references/asm_schema_overview.md5.9 KB
View
references/field_classification_guide.md16.9 KB
View
references/flattening_guide.md7.2 KB
View
references/supported_instruments.md5.2 KB
View
requirements.txt0.8 KB
View
scripts/convert_to_asm.py16.9 KB
View
scripts/export_parser.py13.5 KB
View
scripts/flatten_asm.py7.2 KB
View
scripts/validate_asm.py35.8 KB
View
SKILL.md10.4 KB
View

Install instrument-data-to-allotrope

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill