将实验仪器输出文件标准化转换为 Allotrope ASM JSON 或二维 CSV,便于接入 LIMS 与分析流程。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "instrument-data-to-allotrope" 技能: 1. 下载 https://raw.githubusercontent.com/anthropics/knowledge-work-plugins/main/bio-research/skills/instrument-data-to-allotrope/SKILL.md 2. 保存为 ~/.claude/skills/instrument-data-to-allotrope/SKILL.md 3. 装好后重载技能,告诉我可以用了
请将这个实验仪器导出的 PDF、CSV 和 Excel 文件自动识别类型,并转换为 Allotrope Simple Model (ASM) JSON。同时输出一份扁平化二维 CSV,保留样本编号、检测结果、单位、时间戳和仪器元数据。
输出完整的 ASM JSON 和适合导入数据库或表格系统的二维 CSV 文件。
我需要把一批实验室仪器 TXT 和 CSV 数据标准化后上传到 LIMS。请转换为结构统一的 ASM JSON,并额外生成字段清晰、列名规范的二维 CSV,方便我做批量导入。
输出可直接用于 LIMS/ELN 集成的标准化数据文件,并统一字段结构。
基于这份仪器输出样例,除了转换成 ASM JSON 外,请再导出可复用的 Python 解析代码,方便数据工程团队接入数据湖生产管道,并说明关键字段映射关系。
输出 ASM JSON、字段映射说明以及可部署到生产流程的 Python 解析代码。
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 standardsThis 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.mdfor 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.
measurement-document (direct instrument readings)calculated-data-aggregate-document (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
…
围绕客户问题进行多来源调研与溯源,快速整理背景并支持准确回复。
用于创建、编辑、分析电子表格,并支持公式、格式与可视化处理。