scientific-problem-sel…
This skill should be used when scientists need help with research problem selection, project ideation, troubleshooting stuck…
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
$ npx -y skills add aws-samples/amazon-bedrock-agents-healthcare-lifesciences --skill instrument-data-to-allotrope --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/instrument-data-to-allotropeContext preview
The summary Claude sees to decide when to auto-load this skill.
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
name: instrument-data-to-allotrope description: 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 for upload to LIMS/ELN systems, or generating parser code for production pipelines.
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.
1. **Detect instrument type** from file contents (auto-detect or user-specified) 2. **Parse file** using allotropy library (native) or flexible fallback parser 3. **Generate outputs**:
4. **Deliver** files with summary and usage instructions
> **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.
# 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.
Calculated values MUST include traceability via `data-source-aggregate-document`:
"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:
python 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:**
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 |
A library of healthcare and life sciences domain capabilities — reference agents with best practices, reusable skills, and MCP-based tools — serving builders in their IDEs, researchers in Amazon Quick, and developers deploying to AWS.
This skill should be used when scientists need help with research problem selection, project ideation, troubleshooting stuck…
Use when a researcher needs to query biomedical databases for biomarker discovery, build target profiles from UniProt/Open…
Use when orchestrating a multi-agent biomarker discovery workflow that requires coordinating database queries, pathway analysis,…
Use when a researcher needs to analyze biological pathways for biomarker discovery, map disease mechanisms to druggable targets…
Use when drafting clinical trial protocol sections (objectives, background, study design) grounded in ICH guidelines (E6, E8, E9)…
Use when interpreting genomic variants from VCF files, performing clinical variant classification using ClinVar/VEP annotations,…