Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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
.claude/skills/instrument-data-to-allotrope/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-06 | ✗→✓ | ▲ Improved | — | — |
| case-08 | ✗→✓ | ▲ Improved | — | — |
| case-17 | ✗→✓ | ▲ Improved | — | — |
| case-12 | ✗→✓ | ▲ Improved | — | — |
| case-02 | ✗→✓ | ▲ Improved | — | — |
Convert instrument files into standardized Allotrope Simple Model (ASM) format for LIMS upload, data lakes, or handoff to data engineering teams.
> Note: This is an Example Skill > > This skill demonstrates how skills can support your data engineering tasks—automating schema transformations, parsing instrument outputs, and generating production-ready code. > > To customize for your organization: > - Modify the references/ files to include your company's specific schemas or ontology mappings > - Use an MCP server to connect to systems that define your schemas (e.g., your LIMS, data catalog, or schema registry) > - Extend the scripts/ to handle proprietary instrument formats or internal data standards > > This pattern can be adapted for any data transformation workflow where you need to convert between formats or validate against organizational standards.
> When Uncertain: If you're unsure how to map a field to ASM (e.g., is this raw data or calculated? device setting or environmental condition?), ask the user for clarification. Refer to references/field_classification_guide.md for guidance, but when ambiguity remains, confirm with the user rather than guessing.
python# Install requirements first pip install allotropy pandas openpyxl pdfplumber --break-system-packages # Core conversion from allotropy.parser_factory import Vendor from allotropy.to_allotrope import allotrope_from_file # Convert with allotropy asm = allotrope_from_file("instrument_data.csv", Vendor.BECKMAN_VI_CELL_BLU)
ASM JSON (default) - Full semantic structure with ontology URIs
Flattened CSV - 2D tabular representation
Both - Generate both formats for maximum flexibility
IMPORTANT: Separate raw measurements from calculated/derived values.
measurement-document (direct instrument readings)calculated-data-aggregate-document (derived values)Calculated values MUST include traceability via data-source-aggregate-document:
json"calculated-data-aggregate-document": { "calculated-data-document": [{ "calculated-data-identifier": "SAMPLE_B1_DIN_001", "calculated-data-name": "DNA integrity number", "calculated-result": {"value": 9.5, "unit": "(unitless)"}, "data-source-aggregate-document": { "data-source-document": [{ "data-source-identifier": "SAMPLE_B1_MEASUREMENT", "data-source-feature": "electrophoresis trace" }] } }] }
Common calculated fields by instrument type: | Instrument | Calculated Fields | |------------|-------------------| | Cell counter | Viability %, cell density dilution-adjusted values | | Spectrophotometer | Concentration (from absorbance), 260/280 ratio | | Plate reader | Concentrations from standard curve, %CV | | Electrophoresis | DIN/RIN, region concentrations, average sizes | | qPCR | Relative quantities, fold change |
See references/field_classification_guide.md for detailed guidance on raw vs. calculated classification.
Always validate ASM output before delivering to the user:
bashpython scripts/validate_asm.py output.json python scripts/validate_asm.py output.json --reference known_good.json # Compare to reference python scripts/validate_asm.py output.json --strict # Treat warnings as errors
Validation Rules:
Soft Validation Approach: Unknown techniques, units, or sample roles generate warnings (not errors) to allow for forward compatibility. If Allotrope adds new values after December 2024, the validator won't block them—it will flag them for manual verification. Use --strict mode to treat warnings as errors if you need stricter validation.
What it checks:
data-source-aggregate-document)See references/supported_instruments.md for complete list. Key instruments:
| Category | Instruments | |----------|-------------| | Cell Counting | Vi-CELL BLU, Vi-CELL XR, NucleoCounter | | Spectrophotometry | NanoDrop One/Eight/8000, Lunatic | | Plate Readers | SoftMax Pro, EnVision, Gen5, CLARIOstar | | ELISA | SoftMax Pro, BMG MARS, MSD Workbench | | qPCR | QuantStudio, Bio-Rad CFX | | Chromatography | Empower, Chromeleon |
Always try allotropy first. Check available vendors directly:
pythonfrom allotropy.parser_factory import Vendor # List all supported vendors for v in Vendor: print(f"{v.name}") # Common vendors: # AGILENT_TAPESTATION_ANALYSIS (for TapeStation XML) # BECKMAN_VI_CELL_BLU # THERMO_FISHER_NANODROP_EIGHT # MOLDEV_SOFTMAX_PRO # APPBIO_QUANTSTUDIO # ... many more
When the user provides a file, check if allotropy supports it before falling back to manual parsing. The scripts/convert_to_asm.py auto-detection only covers a subset of allotropy vendors.
Only use if allotropy doesn't support the instrument. This fallback:
calculated-data-aggregate-documentUse flexible parser with:
For PDF-only files, extract tables using pdfplumber, then apply Tier 2 parsing.
Before writing a custom parser, ALWAYS:
references/examples/ or ask userreferences/instrument_guides/validate_asm.py --reference <file>| Mistake | Correct Approach | |---------|------------------| | Manifest as object | Use URL string | | Lowercase detection types | Use "Absorbance" not "absorbance" | | "emission wavelength setting" | Use "detector wavelength setting" for emission | | All measurements in one document | Group by well/sample location | | Missing procedure metadata | Extract ALL device settings per measurement |
Generate standalone Python scripts that scientists can hand off:
python# Export parser code python scripts/export_parser.py --input "data.csv" --vendor "VI_CELL_BLU" --output "parser_script.py"
The exported script:
instrument-data-to-allotrope/
├── SKILL.md # This file
├── scripts/
│ ├── convert_to_asm.py # Main conversion script
│ ├── flatten_asm.py # ASM → 2D CSV conversion
│ ├── export_parser.py # Generate standalone parser code
│ └── validate_asm.py # Validate ASM output quality
└── references/
├── supported_instruments.md # Full instrument list with Vendor enums
├── asm_schema_overview.md # ASM structure reference
├── field_classification_guide.md # Where to put different field types
└── flattening_guide.md # How flattening worksUser: "Convert this cell counting data to Allotrope format"
[uploads viCell_Results.xlsx]
Claude:
1. Detects Vi-CELL BLU (95% confidence)
2. Converts using allotropy native parser
3. Outputs:
- viCell_Results_asm.json (full ASM)
- viCell_Results_flat.csv (2D format)
- viCell_parser.py (exportable code)User: "I need to give our data engineer code to parse NanoDrop files"
Claude:
1. Generates self-contained Python script
2. Includes sample input/output
3. Documents all assumptions
4. Provides Jupyter notebook versionUser: "Convert this ELISA data to a CSV I can upload to our LIMS"
Claude:
1. Parses plate reader data
2. Generates flattened CSV with columns:
- sample_identifier, well_position, measurement_value, measurement_unit
- instrument_serial_number, analysis_datetime, assay_type
3. Validates against common LIMS import requirementsbashpip install allotropy --break-system-packages
If allotropy native parsing fails:
Validate output against Allotrope schemas when available:
pythonimport jsonschema # Schema URLs in references/asm_schema_overview.md
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-06 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 20 counted toward the lift figure. The other 2 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +50 percentage points is the difference between those two pass rates over the 20 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.