Communitygithub.com

分析方法バリデーション

ICH Q2(R2)/Q14、USP<1220>/<1225>/<1226>、ICH M10、CLSI EP、ISO/IEC 17025などの規制枠組みに基づき、分析手順のバリデーション、ベリフィケーション、移管を計画、実行、文書化します。HPLC、LC-MS/MS、GC、CE、ICP-MS、溶出試験、qNMR、qPCR、NIR、リガンド結合アッセイ、細胞ベースアッセイに使用します。

分析方法バリデーション とは?

このスキルは、分析手順がその意図された目的に適合するかどうかを判断するための、包括的な分析方法バリデーション支援ツールです。ICH Q2(R2)、USP<1225>、ICH M10、CLSI EP、ISO/IEC 17025など、異なる規制枠組みに基づいてバリデーション試験を設計し、統計計算を正確に実行し、文書化を構造化します。このスキルは、HPLC、LC-MS/MS、GC、CE、ICP-MS、溶出試験、qNMR、qPCR、NIR、リガンド結合アッセイ、細胞ベースアッセイなど、多様な分析技術をサポートします。主な機能には、バリデーションプロトコルの生成、検量線の応答評価(直線性、真度、精度)、検出限界/定量限界の決定、ICH M10に基づくバイオ分析ランの評価、メソッド比較と移管のための等価性検定が含まれます。このスキルは、r²のみによる直線性の誤った判断、データ収集後の受容基準の設定、分析間変動を無視した併行精度の報告など、一般的なバリデーションの誤りを防ぐことを目的としています。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/K-Dense-AI/scientific-agent-skills/tree/main/skills/analytical-method-validation

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

分析方法バリデーション は何をしますか?

使用するタイミング

分析手順がその意図された目的に適合するかどうかが問われるあらゆる場面で使用します: バリデーション試験の設計、バリデーションデータの評価、公定書手順のベリフィケーション、 手順の他ラボや機器への移管、またはこれらをレポートで擁護する場合。

2つのルール

1. 何かを設計する前に、どの枠組みが適用されるかを確定する。 同じアッセイでも、 ICH Q2(R2)、USP<1225>、ICH M10、CLSI EP、ISO/IEC 17025ではバリデーション方法が異なります。 要求される特性、試験の構成、数値的な受容基準の有無が異なります。これらを混在させると、 どの枠組みも満たさないプロトコルが出来上がります。

2. データ収集前に受容基準を明記する。 結果を見た後に選択された基準は受容基準ではなく、 事後的な決定は恒常的な監査指摘事項となります。ICH Q2(R2)は意図的にほとんど数値基準を提供しておらず、 それらは規格、分析ターゲットプロファイル(ICH Q14 セクション3)、または開発データから導出する必要があります。 ICH M10は例外で、明示的な数値が提供されており、クロマトグラフィーアッセイとリガンド結合アッセイで異なります。

範囲

このスキルは、試験を計画し、統計を正しく計算し、文書化を構造化します。 手順がバリデートされたと判断することはせず、バッチのリリース、ランの合格/不合格判定、 調査の終結、または分析者、技術レビュアー、品質部門、規制当局の代わりにはなりません。 すべてのスクリプトは報告を行いますが、結論は下しません。

著作権の境界

ICHガイドラインは公開されており、謝辞を条件に再利用のライセンスが付与されているため、 その要件はこのスキルに直接エンコードされています。USPの一般章、CLSI EP文書、ISO規格は 著作権で保護され、ペイウォールの対象です。 これらについては、このスキルは名称、範囲、 および認可されたコピーを入手する方法を提供しますが、テキストや発明された閾値は決して提供しません。 エージェントにそれらのコンテンツの取得、書き起こし、または再構築を依頼しないでください。 数値が重要で、それがペイウォールのある文書に存在する場合、認可されたコピーから読み取ってください。

枠組み

cd skills/analytical-method-validation/scripts
python3 plan_validation.py --list-frameworks
キー適用範囲数値基準の有無
ich-q2r2原薬および製品のリリース試験と安定性試験ほとんどなし — ユーザーが導出
ich-m10バイオ分析濃度測定 (PK, TK, BE)あり、モダリティによって異なる
usp-1220公定書手順のライフサイクル、3段階ペイウォール
usp-1225 / usp-1226公定書手順のバリデーション/ベリフィケーションペイウォール
clsi臨床検査測定手順 (EPシリーズ)ペイウォール
iso-17025認定下でのラボ開発および修正メソッドなし — 「必要な範囲で」

Q2(R2)は2023年11月にQ2(R1)を置き換え、特性を再構成しました。 レンジは現在、親特性(セクション3.2)であり、 応答(直線性)と下限レンジのバリデーション(DL/QL)を含みます。真度と精度はセクション3.3で、 単一の基準に対して組み合わせて評価される場合があります。ロバストネスは開発活動として扱われ、 ICH Q14を参照します。多変量手順(2.5および3.2.2.3)が明示的に扱われ、 附属書2にはQ2(R1)がカバーしなかった手法の実例が追加されました — 定量¹H-NMR、NIR、定量LC/MS、qPCR、 生物学的アッセイ、粒子径。Q2(R1)形式のプロトコル — 直線性、レンジ、真度、精度、特異性、LOD、LOQ、 ロバストネスのフラットなリスト — は時代遅れです。また、2023年11月30日付けの表5および表6〜11の誤り訂正に注意してください。

スクリプト

cd skills/analytical-method-validation/scripts
スクリプト回答する質問
plan_validation.pyどの枠組み、どの特性、どの試験レイアウト、どのプロトコル?
check_response.py検量モデルは実際にレンジ全体で成立するか?
check_accuracy_precision.py回収率は?変動のうちどの程度が日間差か?
check_detection_limits.py各許容アプローチによるDLとQLは?それらは報告閾値に十分か?
check_bioanalytical_run.pyこのランはそのモダリティのICH M10を満たすか?
compare_methods.py2つの手順は、事前に定めたマージンで同等か?

すべて --format table|tsv|json を取ります。出典、ガイドライン引用、注意事項はstderrへ、 データはstdoutへ出力されるため、> out.tsv で分離できます。終了コードは 0(指摘事項なし)、1 (指摘事項あり)、2(不正な入力)であり、いずれもワークフローをゲート制御できます。

ワークフロー

1. 枠組みと必要な特性を固定する

python3 plan_validation.py --framework ich-q2r2 --attribute assay --technique hplc --range-use assay

Q2(R2) 表1は、手法ではなく測定属性に基づいて何が必要かを決定します。 アッセイの場合:特異性、応答、真度、併行精度、中間精度。 リミット試験の場合:特異性とDLのみ。同定試験の場合:特異性のみ。 属性は assay、impurity(定量)、impurity-limit、identity を受け入れます。

報告可能範囲は規格から決まります。Q2(R2) 表2に実例が示されています — アッセイの場合は宣言含有量の80〜120%、 含量均一性の場合は70〜130%、不純物の場合は規格の120%までの報告閾値。

2. プロトコルを生成し、基準を記入する

python3 plan_validation.py --framework ich-q2r2 --attribute impurity --protocol > protocol.md

すべての角括弧で囲まれたフィールドは、データ収集前に決定し記録すべき判断事項です。 プロトコルの骨格は、Q2(R2)の作業に対して受容基準を事前に入力することを意図的に拒否します。 なぜなら、弁護可能なデフォルト値が存在しないからです。

3. 応答を評価する

python3 check_response.py -i calibration.csv --max-back-calc-error 2

入力は level,response で、1行が1回の注入です。同じレベルの繰り返し行は反復と見なされ、 それを提供することで直線性検定が可能になります。

決定係数では通過してしまうような曲線からの実際の出力:

statistic                           value
distinct levels                     5
slope                               166.6000
intercept                           2495.0000
intercept CI includes 0             no
coefficient of determination (r2)   0.9830
lack-of-fit F                       469.5294
lack-of-fit p                       1.5139e-06
runs test p                         0.0492

level     n  mean_response  mean_back_calculated  relative_error_pct
50.0000   2  10075.0000     45.4982               -9.0036
75.0000   2  15150.0000     75.9604               1.2805
100.0000  2  20050.0000     105.3721              5.3721
125.0000  2  24050.0000     129.3818              3.5054
150.0000  2  26450.0000     143.7875              -4.1417

r² = 0.983だがモデルは使用不可:レンジ下限で−9.0%の逆計算誤差、 適合度不足 p = 1.5 × 10⁻⁶、非ランダムな残差符号。r²は直線性の証拠ではない — 範囲が広がると上昇し、曲率にはほとんど影響されません。純粋誤差に対する適合度不足F検定と 残差パターンが証拠であり、これがQ2(R2) 3.2.2.1が相関係数単独ではなく、 点の直線からの偏差の分析を求めている理由です。

広範囲の曲線の場合は --weight 1/x2 を追加します。このスクリプトは、レンジの上部3分の1の残差分散が 下部3分の1の10倍を超える場合に不等分散をフラグします。なぜなら、その場合に重みなしのフィッティングは、 報告閾値が存在する低濃度側を正確にバイアスするからです。

4. 真度と精度を評価する

python3 check_accuracy_precision.py -i ap.csv --accuracy-limit 2 --rsd-limit 1.0 --design-check assay

入力は level,measured,group で、group は中間精度の要因 — 日、分析者、または機器です。

level  component                       sd      rsd_pct  df      ci90_low_sd  ci90_high_sd
100    repeatability (within group)    0.0707  0.0707   3       0.0438       0.2065
100    between-group                   1.6515  1.6515   2       n/a          n/a
100    intermediate precision (total)  1.6530  1.6530   2.0037  0.9554       7.2821

RSD 0.07%の併行精度は素晴らしく見えますが、中間精度は1.65%で、その23倍の大きさです。 なぜなら変動は完全に日間に存在するからです。日内の数値を手順の精度として報告すると、 日常的なパフォーマンスを一桁以上過小評価することになります。 これが、スクリプトがプーリングではなく一元配置変量効果モデルを当てはめる理由です。

スクリプトが処理する2つの落とし穴:

  • 精度は各レベル内で推定され、レベル間でプールされることはありません。 80/100/120%の結果を 1つの標準偏差にプールすると、レンジ自体が見かけ上の不精確さになります。スクリプトはレベルごとに報告し、 さらにレベルに依存しないビューを名目値のパーセントとして提供します。
  • --require-ci-within-limit は、平均だけでなく信頼区間全体が限界内にあることを強制します。 Q2(R2) 3.3.1.4は、区間が基準と適合することを求めています。6回の反復でぎりぎり内側に収まる平均は、 多くを示しているとは言えません。

5. DLとQLを確立し、確認する

python3 check_detection_limits.py --calibration lowcal.csv --blanks blanks.csv \
    --confirm-ql 0.05 --confirm-data ql_check.csv --reporting-threshold 0.05
approach                                          sigma   slope      DL      QL
sd-and-slope (sigma = residual SD of regression)  7.2816  5033.3490  0.0048  0.0145
sd-and-slope (sigma = SD of y-intercept)          4.3303  5033.3490  0.0028  0.0086
sd-and-slope (sigma = SD of 8 blanks)             3.7702  5033.3490  0.0025  0.0075

同じデータから、σの選択だけでQL推定値が1.9倍も異なります。Q2(R2) 3.2.3.5はしたがって、 限界値とその決定に使用したアプローチの両方を報告すること、そして推定限界値を その近くまたはその値のサンプルで確認することを要求しています。不純物試験手順の場合、QLは報告閾値以下でなければなりません。 反射的に 3.3σ/slope を使用し、名前のあるアプローチなしで1つの数値を報告し、 それを確認しないことは、3つの個別の指摘事項です。

6. ICH M10に基づくバイオ分析ラン

python3 check_bioanalytical_run.py --modality chromatographic --run run1.csv
python3 check_bioanalytical_run.py --modality lba --isr isr.csv
python3 check_bioanalytical_run.py --modality lba --criteria

--modality は必須であり、デフォルト値はありません。なぜなら基準が本当に異なるからです:

クロマトグラフィーリガンド結合アッセイ
検量線の許容範囲±15%、LLOQでは±20%±20%、LLOQとULOQでは±25%
真度/精度±15% / ≤15% CV (±20% / ≤20% at LLOQ)±20% / ≤20% CV (±25% / ≤25% at LLOQ and ULOQ)
A&Pデザイン4 QCレベル、5反復/ラン、≥3ラン、≥2日間5 QCレベル、3反復/ラン、≥6ラン、≥2日間
総誤差該当基準なし≤30%、LLOQとULOQでは≤40%
ISR一致度繰り返しの≥2/3で±20%繰り返しの≥2/3で±30%

リガンド結合アッセイに±15%のクロマトグラフィー数値を適用すること、またはLBAの総誤差基準を クロマトグラフィー法に導入することは、どちらも一般的であり、どちらも誤りです。

ラン確認は、見落とされがちなレベルごとのルールを強制します: すべての QCの少なくとも2/3 かつ 各レベルの少なくとも50%。 ランは全体の割合を通過しても、単一のレベルが完全に不合格になる可能性があります。

finding: QC level high: 0/2 within tolerance (0%); M10 requires at least 50% at each level

7. 移管とメソッド比較

python3 compare_methods.py -i paired.csv --margin 2 --relative --slope-tolerance 0.05
mean difference (%)                       1.4646
TOST margin                               2.0000
TOST p-value                              1.0528e-13
90% CI (TOST)                             1.44127 to 1.48797
equivalent at stated margin               yes
--- for contrast only ---
paired t-test p (NOT equivalence)         0.0000
OLS slope (biased here)                   1.0396
Deming slope                              1.0398
Passing-Bablok slope                      1.0351

これが置き換える2つの誤り:

  • 「p > 0.05、有意差なし、したがってメソッドは同等である。」 差を検出できないことは 同等性の証拠ではなく、小さな移管データセットではその結果はほぼ確実です。 TOSTは重要な仮説 — 真の差が事前に定めたマージン内にあること — を検定します。 ここではt検定は差が非常に有意であると言い、かつ TOSTはメソッドが±2%で同等であると言います。 両方とも真であり、質問に答えているのは一方だけです。
  • メソッド比較のための通常最小二乗法。 OLSは参照値に誤差がないと仮定しますが、 2つの手順を比較する場合これは誤りであり、傾きをゼロにバイアスします。 Deming(指定された誤差分散比を使用)とPassing-Bablok(ノンパラメトリック、外れ値にロバスト)は 適切な回帰であり、比較のためにOLSと並べて報告されます。

このスクリプトはまた、比例バイアス — 差が濃度とともに傾向を持つ場合、単一の平均バイアスとその一致限界は、 どれほど厳密に見えても誤解を招く — をフラグします。

このスキルが防止するもの

  1. Q2(R2)が置き換わって3年経ってもICH Q2(R1)の構造に対してバリデーションを行うこと。
  2. データを見た後に書かれた受容基準。
  3. 直線性の証拠として提示されるr²。
  4. 手順の精度として報告される併行精度で、日間変動が不可視であること。
  5. 名前のあるアプローチと確認なしの1つのDL/QL数値。
  6. リガンド結合アッセイにクロマトグラフィーのM10基準を適用すること、またはその逆。
  7. t検定の非有意性をメソッド移管での同等性として提示すること。

参考文献

  • references/framework-selection.md — どの枠組みが適用されるか、および質問

…

[翻訳のため省略]

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

adaptyv

How to use the Adaptyv Bio Foundry API and Python SDK for protein experiment design, submission, and results retrieval. Use this skill whenever the user mentions Adaptyv, Foundry API, protein binding assays, protein screening experiments, BLI/SPR assays, thermostability assays, or wants to submit protein sequences for experimental characterization. Also trigger when code imports `adaptyv`, `adaptyv_sdk`, or `FoundryClient`, or references `foundry-api-public.adaptyvbio.com`.

aeon

This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search. Use when working with temporal data, sequential patterns, or time-indexed observations requiring specialized algorithms beyond standard ML approaches. Particularly suited for univariate and multivariate time series analysis with scikit-learn compatible APIs.

alphagenome

Look up precomputed AlphaGenome Atlas effects for any GRCh38 single-nucleotide variant (AVI score with Phred and 18 SHAP feature attributions, plus raw and quantile scores for RNA-seq, DNase, ATAC, ChIP-TF, ChIP-histone, CAGE, PRO-cap, splicing, polyadenylation and contact-map tracks), score variants or scan windows on demand with the AlphaGenome model for human and mouse (variant scoring, in silico mutagenesis, REF-versus-ALT track prediction), and build Atlas website deep links. Use when the user mentions AlphaGenome, AlphaGenome Atlas, AVI or AlphaGenome Variant Impact, DeepMind variant effect prediction, or wants to prioritise or mechanistically interpret non-coding, regulatory, splicing, enhancer, promoter, or chromatin-accessibility effects of SNVs from a VCF, credible set, or region. Research use only; not a clinical tool.

anndata

Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.

arbor

Autonomously improve a real artifact (code, training recipe, agent harness, data pipeline, prompt) against an objective and an evaluator, using Hypothesis Tree Refinement (HTR) from the Arbor paper. Use this whenever someone wants to iteratively optimize something over many experiments without overfitting — e.g.

arboreto

Infer gene regulatory networks (GRNs) from gene expression data using scalable algorithms (GRNBoost2, GENIE3). Use when analyzing transcriptomics data (bulk RNA-seq, single-cell RNA-seq) to identify transcription factor-target gene relationships and regulatory interactions. Supports distributed computation for large-scale datasets.

astropy

Core Python library for astronomy and astrophysics workflows that need Astropy APIs, including units/quantities, coordinates, FITS I/O, tables, time systems, WCS, and cosmology. Use when implementing or debugging astronomical data analysis code with Astropy.

autoskill

Observe the user

benchling-integration

Benchling Python SDK and REST API integration for registry entities, inventory, ELN entries, workflows, Benchling Apps, and Data Warehouse queries. Use when automating lab data with benchling-sdk or the v2 API.

bgpt-paper-search

Search scientific papers and retrieve structured experimental data extracted from full-text studies via the BGPT MCP server. Returns 25+ fields per paper including methods, results, sample sizes, quality scores, and conclusions. Use for literature reviews, evidence synthesis, and finding experimental details not available in abstracts alone.

bids

>

biopython

Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.

bioservices

Unified Python interface to 40+ bioinformatics services. Use when querying multiple databases (UniProt, KEGG, ChEMBL, Reactome) in a single workflow with consistent API. Best for cross-database analysis, ID mapping across services. For quick single-database lookups use gget; for sequence/file manipulation use biopython.

bulk-rnaseq

End-to-end bulk RNA-seq orchestrator — takes raw FASTQ reads through QC and trimming (FastQC, fastp/Trim Galore), alignment and quantification (STAR, Salmon, featureCounts), assembles a gene-level counts matrix, then hands off to differential expression (pydeseq2), pathway/GSEA enrichment (pathway-enrichment), and publication figures (scientific-visualization). Use whenever the user has bulk RNA-seq reads or quant output and wants a complete, reproducible differential-expression workflow — e.g.

cellxgene-census

Query the CZ CELLxGENE Census programmatically for versioned public single-cell and spatial transcriptomics data. Use when you need population-scale cell metadata, gene expression slices, Census summary counts, source H5AD URIs/downloads, embeddings, spatial Census data, or reference atlas comparisons across organisms, tissues, diseases, assays, and cell types. For analyzing your own local single-cell data use scanpy, anndata, or scvi-tools.

cirq

Google quantum computing framework. Use when targeting Google Quantum AI hardware, designing noise-aware circuits, or running quantum characterization experiments. Best for Google hardware, noise modeling, and low-level circuit design. For IBM hardware use qiskit; for quantum ML with autodiff use pennylane; for physics simulations use qutip.

citation-management

Comprehensive citation management for academic research. Search OpenAlex, PubMed, and Google Scholar for papers, extract accurate metadata, validate citations, and generate properly formatted BibTeX entries. This skill should be used when you need to find papers, verify citation information, convert DOIs to BibTeX, or ensure reference accuracy in scientific writing.

clinical-decision-support

Prepare and validate research-only clinical decision-support evaluation, evidence-profile, cohort, survival, biomarker/model, privacy, and governance artifacts. Use for aggregate or synthetic research documentation and traceability—not patient care or live clinical operation.

clinical-reports

Create safety-bounded draft structures and run local deterministic checks for clinical case, diagnostic, trial, safety, and aggregate research reports. Use only with synthetic, de-identified, or aggregate inputs and verified source-fact manifests; every output requires qualified review.

cobrapy

Constraint-based metabolic modeling (COBRA). FBA, FVA, gene knockouts, flux sampling, SBML models, for systems biology and metabolic engineering analysis.

関連スキル