agentleFS
nisarthnisarth/claude-skills-store/skills/bio-research/instrument-data-to-allotrope/SKILL.md

instrument-data-to-allotrope

Skill1 starsChanged 7 months agoMITView on GitHub

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 pipelines. Trigger with "convert instrument data", "allotrope format", "standardize lab data", "parse plate reader output", or "LIMS-ready format".

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 13 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈13

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    CSV/TSV files: Read the file and identify the delimiter, header rows, metadata rows, and data blocks.

    line 38
  2. Distinctive:

    Plate reader: Look for 96/384-well grid layouts, absorbance/fluorescence headers, wavelength parameters.

    line 44
  3. Distinctive:

    HPLC: Look for retention time, peak area, chromatogram data, column specifications.

    line 45
  4. Distinctive:

    Mass spectrometer: Look for m/z values, intensity, scan numbers, precursor ions.

    line 46
  5. Distinctive:

    qPCR: Look for Ct/Cq values, cycle data, melt curve data, well assignments.

    line 47
  6. Distinctive:

    Spectrophotometer: Look for wavelength scans, absorbance/transmittance arrays.

    line 48
  7. Distinctive:

    Flow cytometer: Look for event counts, gating parameters, fluorescence channels.

    line 49
  8. Distinctive:

    Check for missing required fields and warn the user.

    line 84
  9. Distinctive:

    Action: Read the Excel file, detect 96-well plate reader layout, extract absorbance readings at 450nm and 570nm, map to ASM UV-absorbance …

    line 117
  10. Distinctive:

    Action: Read CSV, identify retention time and peak area columns, extract method parameters from header rows, produce flat CSV with one row …

    line 120
  11. Distinctive:

    Always preserve raw measurement values alongside any instrument-calculated results.

    line 127
  12. Distinctive:

    When the instrument type cannot be auto-detected with confidence, ask the user rather than guessing.

    line 128
  13. Distinctive:

    When encountering proprietary binary formats, inform the user that the file must first be exported to CSV or PDF from the instrument …

    line 132

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Instrument Data to Allotrope Converter

Convert raw laboratory instrument output files into standardized Allotrope Simple Model (ASM) JSON or flattened 2D CSV suitable for LIMS ingestion, data lake storage, and reproducible analysis pipelines.

Workflow

Step 1: Identify the Instrument and File Format

Inspect the input file to determine its structure:

  • PDF files: Extract tables and metadata using text extraction. Look for instrument headers, run parameters, and result tables.
  • CSV/TSV files: Read the file and identify the delimiter, header rows, metadata rows, and data blocks.
  • Excel files (.xlsx/.xls): Inspect all sheets. Instrument software often places metadata on one sheet and results on another.
  • TXT files: Parse fixed-width or delimited output. Identify instrument-specific markers.

Detect the instrument type from file content if not specified:

  • Plate reader: Look for 96/384-well grid layouts, absorbance/fluorescence headers, wavelength parameters.
  • HPLC: Look for retention time, peak area, chromatogram data, column specifications.
  • Mass spectrometer: Look for m/z values, intensity, scan numbers, precursor ions.
  • qPCR: Look for Ct/Cq values, cycle data, melt curve data, well assignments.
  • Spectrophotometer: Look for wavelength scans, absorbance/transmittance arrays.
  • Flow cytometer: Look for event counts, gating parameters, fluorescence channels.

Step 2: Extract Structured Data

Parse the raw file into a normalized intermediate representation:

  1. Metadata block: Extract run date, instrument model, software version, operator name, method/protocol name, and run parameters (temperature, wavelength, flow rate, etc.).
  2. Sample manifest: Extract sample identifiers, well positions, dilution factors, sample types (unknown, standard, blank, control).
  3. Measurement data: Extract the primary measurement matrix with proper units. Handle multi-wavelength reads, time-series data, and replicate groupings.
  4. Calculated results: Extract any instrument-computed values (concentrations from standard curves, percent inhibition, etc.) separately from raw measurements.

Step 3: Map to Allotrope Simple Model Schema

Transform the intermediate representation into ASM-compliant structure:

  • Map instrument metadata to ASM device-system-document fields.
  • Map each measurement to an ASM measurement-group with proper measurement-type (e.g., ultraviolet-absorbance, fluorescence, mass-spectrum).
  • Assign ASM-compliant unit ontology references (e.g., qudt:MilliAbsorbanceUnit, qudt:Nanometer).
  • Preserve sample-to-measurement linkage via sample-document references.
  • Include data-processing metadata (baseline correction, smoothing) when present.

Step 4: Generate Output

ASM JSON output (asm-json):

  • Produce a valid JSON document conforming to the Allotrope Simple Model schema.
  • Include the $asm.manifest header with schema version and converter metadata.
  • Validate required fields: measurement-type, device-type, data-system-instance-identifier.

Flat CSV output (flat-csv):

  • Flatten the hierarchical ASM structure into a 2D table.
  • One row per measurement. Columns: sample_id, well_position, measurement_type, value, unit, instrument, run_date, method, plus instrument-specific columns.
  • Include a companion _metadata.json file with run-level information that does not fit in the flat structure.

Step 5: Validate and Report

  • Check for missing required fields and warn the user.
  • Report the number of samples, measurements, and any parsing anomalies.
  • Flag potential data quality issues: out-of-range values, missing wells, blank wells with signal.

Output Format

## Conversion Report

**Input**: <filename> (<instrument_type> detected)
**Output**: <output_filename> (<format>)
**Samples**: <count> | **Measurements**: <count>

### Metadata Extracted
| Field               | Value                          |
|---------------------|--------------------------------|
| Instrument          | <model>                        |
| Software Version    | <version>                      |
| Run Date            | <date>                         |
| Method              | <method_name>                  |
| Operator            | <name>                         |

### Data Quality Notes
- <any warnings about missing data, anomalies, or assumptions made>

### Output Files
- `<output_file>` - Primary ASM JSON / flat CSV
- `<metadata_file>` - Companion metadata (flat-csv mode only)

Examples

User: "Convert this plate reader Excel file to Allotrope format" Action: Read the Excel file, detect 96-well plate reader layout, extract absorbance readings at 450nm and 570nm, map to ASM UV-absorbance measurement groups, produce ASM JSON.

User: "Parse my HPLC CSV and flatten it for our data lake" Action: Read CSV, identify retention time and peak area columns, extract method parameters from header rows, produce flat CSV with one row per peak per injection.

User: "I have a qPCR PDF report, can you get the Ct values into a structured format?" Action: Extract tables from PDF, identify Ct values per well, map well positions to sample IDs from the plate layout, produce ASM JSON with qPCR measurement type.

Best Practices

  • Always preserve raw measurement values alongside any instrument-calculated results. Downstream analysis may need to recompute from raw data.
  • When the instrument type cannot be auto-detected with confidence, ask the user rather than guessing. Incorrect mapping produces silently wrong output.
  • Include provenance metadata in the output: source filename, conversion timestamp, converter version. This supports audit trails in regulated environments.
  • For multi-plate or multi-run files, produce one ASM document per logical experiment to maintain clean data boundaries.
  • Validate units carefully. Instrument software sometimes reports absorbance as "mAU" (milli-absorbance units) or "AU" depending on configuration. Map to the correct QUDT ontology term.
  • When encountering proprietary binary formats, inform the user that the file must first be exported to CSV or PDF from the instrument software.
  • For GxP/regulated environments, note that this conversion is informational. The user is responsible for validation per 21 CFR Part 11 requirements.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.