jpskill.com
📄 ドキュメント コミュニティ

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 for upload to LIMS/ELN systems, or generating parser code for production pipelines.

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o instrument-data-to-allotrope.zip https://jpskill.com/download/22569.zip && unzip -o instrument-data-to-allotrope.zip && rm instrument-data-to-allotrope.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/22569.zip -OutFile "$d\instrument-data-to-allotrope.zip"; Expand-Archive "$d\instrument-data-to-allotrope.zip" -DestinationPath $d -Force; ri "$d\instrument-data-to-allotrope.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して instrument-data-to-allotrope.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → instrument-data-to-allotrope フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
10

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

[スキル名] instrument-data-to-allotrope

機器データからAllotropeへの変換ツール

機器ファイルを標準化されたAllotrope Simple Model (ASM) 形式に変換し、LIMSへのアップロード、データレイク、またはデータエンジニアリングチームへの引き渡しに利用します。

注: これはスキルの例です

このスキルは、スキーマ変換の自動化、機器出力の解析、本番環境対応コードの生成など、データエンジニアリングタスクをスキルがどのようにサポートできるかを示しています。

組織に合わせてカスタマイズするには:

  • references/ ファイルを修正し、貴社の特定のスキーマまたはオントロジーマッピングを含めます。
  • MCPサーバーを使用して、スキーマを定義するシステム(例:LIMS、データカタログ、スキーマレジストリ)に接続します。
  • scripts/ を拡張して、独自の機器フォーマットや社内データ標準を処理します。

このパターンは、フォーマット間の変換や組織標準に対する検証が必要な、あらゆるデータ変換ワークフローに適用できます。

ワークフローの概要

  1. ファイルの内容から機器タイプを検出します(自動検出またはユーザー指定)。
  2. allotropyライブラリ(ネイティブ)または柔軟なフォールバックパーサーを使用してファイルを解析します。
  3. 出力を生成します。
    • ASM JSON(完全な意味構造)
    • フラット化されたCSV(2次元の表形式)
    • Pythonパーサーコード(データエンジニアへの引き渡し用)
  4. 概要と使用説明書とともにファイルを配信します。

不明な点がある場合: フィールドをASMにどのようにマッピングすればよいか不明な場合(例:これは生データか計算データか?デバイス設定か環境条件か?)、ユーザーに説明を求めてください。ガイダンスについては references/field_classification_guide.md を参照してください。しかし、曖昧さが残る場合は、推測するのではなくユーザーに確認してください。

クイックスタート

# 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 (デフォルト) - オントロジーURIを含む完全な意味構造

  • 最適な用途: ASMを期待するLIMSシステム、データレイク、長期アーカイブ
  • Allotropeスキーマに対して検証されます

フラット化されたCSV - 2次元の表形式表現

  • 最適な用途: 迅速な分析、Excelユーザー、JSONをサポートしないシステム
  • 各測定値が1行になり、メタデータが繰り返されます

両方 - 最大限の柔軟性のために両方の形式を生成します

計算データの処理

重要: 生の測定値と計算/派生値を分離してください。

  • 生データmeasurement-document (直接的な機器の読み取り値)
  • 計算データcalculated-data-aggregate-document (派生値)

計算値には、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"
      }]
    }
  }]
}

機器タイプ別の一般的な計算フィールド: | 機器 | 計算フィールド | |------------|-------------------| | セルカウンター | 生存率 %、細胞密度希釈調整値 | | 分光光度計 | 濃度(吸光度から)、260/280比 | | プレートリーダー | 標準曲線からの濃度、%CV | | 電気泳動 | DIN/RIN、領域濃度、平均サイズ | | qPCR | 相対定量、フォールドチェンジ |

生データと計算データの分類に関する詳細なガイダンスについては、references/field_classification_guide.md を参照してください。

検証

ユーザーに配信する前に、常にASM出力を検証してください。

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

検証ルール:

ソフト検証アプローチ: 未知の技術、単位、またはサンプルロールは、前方互換性を可能にするために警告(エラーではない)を生成します。Allotropeが2024年12月以降に新しい値を追加した場合、バリデーターはそれらをブロックせず、手動検証のためにフラグを立てます。より厳密な検証が必要な場合は、--strict モードを使用して警告をエラーとして扱ってください。

チェックする内容:

  • 正しい技術選択(例:多項目分析プロファイリング vs プレートリーダー)
  • フィールド命名規則(ハイフンではなくスペース区切り)
  • 計算データにトレーサビリティがあること(data-source-aggregate-document
  • 測定値と計算値に一意の識別子が存在すること
  • 必須メタデータが存在すること
  • 有効な単位とサンプルロール(未知の値に対するソフト検証を含む)

サポートされている機器

完全なリストについては references/supported_instruments.md を参照してください。主な機器は以下の通りです。

カテゴリ 機器
細胞計数 Vi-CELL BLU, Vi-CELL XR, NucleoCounter
分光光度法 NanoDrop One/Eight/8000, Lunatic
プレートリーダー SoftMax Pro, EnVision, Gen5, CLARIOstar
ELISA SoftMax Pro, BMG MARS, MSD Workbench
qPCR QuantStudio, Bio-Rad CFX
クロマトグラフィー Empower, Chromeleon

検出と解析戦略

ティア1: ネイティブなallotropy解析 (推奨)

常にallotropyを最初に試してください。 利用可能なベンダーを直接確認します。

from 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

ユーザーがファイルを提供した場合、手動解析にフォールバックする前にallotropyがそれをサポートしているか確認します。

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Instrument Data to Allotrope Converter

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.

Workflow Overview

  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:
    • ASM JSON (full semantic structure)
    • Flattened CSV (2D tabular format)
    • Python parser code (for data engineer handoff)
  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.

Quick Start

# 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)

Output Format Selection

ASM JSON (default) - Full semantic structure with ontology URIs

  • Best for: LIMS systems expecting ASM, data lakes, long-term archival
  • Validates against Allotrope schemas

Flattened CSV - 2D tabular representation

  • Best for: Quick analysis, Excel users, systems without JSON support
  • Each measurement becomes one row with metadata repeated

Both - Generate both formats for maximum flexibility

Calculated Data Handling

IMPORTANT: Separate raw measurements from calculated/derived values.

  • Raw datameasurement-document (direct instrument readings)
  • Calculated datacalculated-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.

Validation

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:

  • Correct technique selection (e.g., multi-analyte profiling vs plate reader)
  • Field naming conventions (space-separated, not hyphenated)
  • Calculated data has traceability (data-source-aggregate-document)
  • Unique identifiers exist for measurements and calculated values
  • Required metadata present
  • Valid units and sample roles (with soft validation for unknown values)

Supported Instruments

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

Detection & Parsing Strategy

Tier 1: Native allotropy parsing (PREFERRED)

Always try allotropy first. Check available vendors directly:

from 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.

Tier 2: Flexible fallback parsing

Only use if allotropy doesn't support the instrument. This fallback:

  • Does NOT generate calculated-data-aggregate-document
  • Does NOT include full traceability
  • Produces simplified ASM structure

Use flexible parser with:

  • Column name fuzzy matching
  • Unit extraction from headers
  • Metadata extraction from file structure

Tier 3: PDF extraction

For PDF-only files, extract tables using pdfplumber, then apply Tier 2 parsing.

Pre-Parsing Checklist

Before writing a custom parser, ALWAYS:

  1. Check if allotropy supports it - Use native parser if available
  2. Find a reference ASM file - Check references/examples/ or ask user
  3. Review instrument-specific guide - Check references/instrument_guides/
  4. Validate against reference - Run validate_asm.py --reference <file>

Common Mistakes to Avoid

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

Code Export for Data Engineers

Generate standalone Python scripts that scientists can hand off:

# Export parser code
python scripts/export_parser.py --input "data.csv" --vendor "VI_CELL_BLU" --output "parser_script.py"

The exported script:

  • Has no external dependencies beyond pandas/allotropy
  • Includes inline documentation
  • Can run in Jupyter notebooks
  • Is production-ready for data pipelines

File Structure

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 works

Usage Examples

Example 1: Vi-CELL BLU file

User: "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)

Example 2: Request for code handoff

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 version

Example 3: LIMS-ready flattened output

User: "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 requirements

Implementation Notes

Installing allotropy

pip install allotropy --break-system-packages

Handling parse failures

If allotropy native parsing fails:

  1. Log the error for debugging
  2. Fall back to flexible parser
  3. Report reduced metadata completeness to user
  4. Suggest exporting different format from instrument

ASM Schema Validation

Validate output against Allotrope schemas when available:

import jsonschema
# Schema URLs in references/asm_schema_overview.md

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。