sample_search
Search samples by factor tokens across Class ID and sample names, then return FileIDs and real file paths for direct use in pai2, dcl, and EIC workflows.
Instructions
因子トークンでサンプルを検索し、FileID と実ファイルパスを返す。
MS-DIAL の Class ID には実験デザインの全因子が入らない(時点・複製・測定日は サンプル名にしか無いことがある)。本ツールは Class ID とサンプル名を統合した トークン空間で検索し、pai2 / dcl / EIC が直接使える形で結果を返す。
specs:
_区切りの因子トークン指定のリスト(要素内 AND・順不同、要素間 OR)。 例["ILG_6h"],["ILG_6h","control_6h"]。省略すると全サンプルとtoken_vocabulary(何で絞れるかの語彙一覧)を返す。directory: 探索先。省略時は既定のデータディレクトリ。ロード済み ARF があれば そのサンプル名を優先して使う。
extensions: 実パスを引く拡張子(既定
[".pai2", ".dcl"])。複数バッチが 混在していても最新バッチを自動選択する。include_roles: 結果に含める role。省略時は全 role を返す(
roleフィールドで 判断できるため検索側では絞らない)。["sample"]で QC/blank を落とせる。
返り値の各サンプルは name / file_id / class_id / role / tokens /
files{拡張子: 実パス}。file_id は eic_plot_chromatograms(file_ids=[...])、
files[".pai2"] は pai2_parser(file_path=...) にそのまま渡せる。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| specs | No | ||
| directory | No | ||
| extensions | No | ||
| include_roles | No |