@pikaa-ai/pikaa 0.3.23 → 0.3.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. package/assets/brand/orbit-logo-option4-whale.jpg +0 -0
  2. package/assets/brand/orbit-logo.jpg +0 -0
  3. package/assets/brand/orbit-logo.png +0 -0
  4. package/assets/brand/orbit-logo.svg +3 -0
  5. package/dist/cli.js +407 -219
  6. package/dist/index.js +7 -2
  7. package/package.json +1 -2
  8. package/skills/adaptyv/SKILL.md +0 -240
  9. package/skills/aeon/SKILL.md +0 -402
  10. package/skills/analytical-method-validation/SKILL.md +0 -299
  11. package/skills/anndata/SKILL.md +0 -431
  12. package/skills/arbor/SKILL.md +0 -152
  13. package/skills/arboreto/SKILL.md +0 -267
  14. package/skills/astropy/SKILL.md +0 -353
  15. package/skills/autoskill/SKILL.md +0 -233
  16. package/skills/benchling-integration/SKILL.md +0 -229
  17. package/skills/bgpt-paper-search/SKILL.md +0 -75
  18. package/skills/bids/SKILL.md +0 -237
  19. package/skills/biopython/SKILL.md +0 -472
  20. package/skills/bioservices/SKILL.md +0 -399
  21. package/skills/bulk-rnaseq/SKILL.md +0 -198
  22. package/skills/cellxgene-census/SKILL.md +0 -283
  23. package/skills/cirq/SKILL.md +0 -370
  24. package/skills/citation-management/SKILL.md +0 -329
  25. package/skills/clinical-decision-support/SKILL.md +0 -238
  26. package/skills/clinical-decision-support/references/README.md +0 -62
  27. package/skills/clinical-reports/SKILL.md +0 -248
  28. package/skills/clinical-reports/references/README.md +0 -34
  29. package/skills/cobrapy/SKILL.md +0 -496
  30. package/skills/consciousness-council/SKILL.md +0 -151
  31. package/skills/dask/SKILL.md +0 -482
  32. package/skills/database-lookup/SKILL.md +0 -386
  33. package/skills/datamol/SKILL.md +0 -200
  34. package/skills/deepchem/SKILL.md +0 -244
  35. package/skills/deepspot-m/SKILL.md +0 -175
  36. package/skills/deeptools/SKILL.md +0 -412
  37. package/skills/depmap/SKILL.md +0 -301
  38. package/skills/dhdna-profiler/SKILL.md +0 -184
  39. package/skills/diffdock/SKILL.md +0 -488
  40. package/skills/dnanexus-integration/SKILL.md +0 -325
  41. package/skills/docx/SKILL.md +0 -99
  42. package/skills/esm/SKILL.md +0 -334
  43. package/skills/etetoolkit/SKILL.md +0 -327
  44. package/skills/exa-search/SKILL.md +0 -102
  45. package/skills/executing-plans/SKILL.md +0 -14
  46. package/skills/experimental-design/SKILL.md +0 -234
  47. package/skills/exploratory-data-analysis/SKILL.md +0 -280
  48. package/skills/flowio/SKILL.md +0 -310
  49. package/skills/fluidsim/SKILL.md +0 -279
  50. package/skills/frontend-design/SKILL.md +0 -100
  51. package/skills/generate-image/SKILL.md +0 -304
  52. package/skills/geniml/SKILL.md +0 -310
  53. package/skills/genomic-coordinates/SKILL.md +0 -189
  54. package/skills/genomic-intelligence/SKILL.md +0 -243
  55. package/skills/geomaster/README.md +0 -105
  56. package/skills/geomaster/SKILL.md +0 -366
  57. package/skills/geopandas/SKILL.md +0 -250
  58. package/skills/get-available-resources/SKILL.md +0 -260
  59. package/skills/gget/SKILL.md +0 -153
  60. package/skills/ginkgo-cloud-lab/SKILL.md +0 -106
  61. package/skills/glycoengineering/SKILL.md +0 -339
  62. package/skills/gtars/SKILL.md +0 -282
  63. package/skills/guardian-rails/SKILL.md +0 -54
  64. package/skills/histolab/SKILL.md +0 -243
  65. package/skills/hugging-science/SKILL.md +0 -132
  66. package/skills/hypogenic/SKILL.md +0 -290
  67. package/skills/hypothesis-generation/SKILL.md +0 -264
  68. package/skills/imaging-data-commons/SKILL.md +0 -496
  69. package/skills/infographics/SKILL.md +0 -315
  70. package/skills/iso-standards-readiness/SKILL.md +0 -352
  71. package/skills/lab-hardware-cad/SKILL.md +0 -372
  72. package/skills/labarchive-integration/SKILL.md +0 -216
  73. package/skills/lamindb/SKILL.md +0 -408
  74. package/skills/latchbio-integration/SKILL.md +0 -227
  75. package/skills/latex-posters/SKILL.md +0 -369
  76. package/skills/latex-posters/references/README.md +0 -439
  77. package/skills/liteparse/SKILL.md +0 -295
  78. package/skills/literature-review/SKILL.md +0 -263
  79. package/skills/markdown-mermaid-writing/SKILL.md +0 -322
  80. package/skills/market-research-reports/SKILL.md +0 -337
  81. package/skills/markitdown/SKILL.md +0 -264
  82. package/skills/matchms/SKILL.md +0 -276
  83. package/skills/matlab/SKILL.md +0 -274
  84. package/skills/matplotlib/SKILL.md +0 -378
  85. package/skills/medchem/SKILL.md +0 -321
  86. package/skills/modal/SKILL.md +0 -468
  87. package/skills/molecular-dynamics/SKILL.md +0 -458
  88. package/skills/molfeat/SKILL.md +0 -348
  89. package/skills/ncats-arax/SKILL.md +0 -178
  90. package/skills/networkx/SKILL.md +0 -440
  91. package/skills/neurokit2/SKILL.md +0 -323
  92. package/skills/neuropixels-analysis/SKILL.md +0 -412
  93. package/skills/nextflow/SKILL.md +0 -195
  94. package/skills/omero-integration/SKILL.md +0 -222
  95. package/skills/onekgpd/SKILL.md +0 -371
  96. package/skills/ontology-term-resolution/SKILL.md +0 -147
  97. package/skills/open-notebook/SKILL.md +0 -297
  98. package/skills/openpiv/SKILL.md +0 -469
  99. package/skills/opentrons-integration/SKILL.md +0 -322
  100. package/skills/optimize-for-gpu/SKILL.md +0 -176
  101. package/skills/owasp-top10/SKILL.md +0 -48
  102. package/skills/pacsomatic/LICENSE +0 -21
  103. package/skills/pacsomatic/SKILL.md +0 -150
  104. package/skills/paper-lookup/SKILL.md +0 -263
  105. package/skills/paperclip/SKILL.md +0 -413
  106. package/skills/paperzilla/SKILL.md +0 -159
  107. package/skills/parallel-web/SKILL.md +0 -128
  108. package/skills/pathml/SKILL.md +0 -222
  109. package/skills/pathogen-variant-surveillance/SKILL.md +0 -208
  110. package/skills/pathway-enrichment/SKILL.md +0 -194
  111. package/skills/pdf/SKILL.md +0 -322
  112. package/skills/peer-review/SKILL.md +0 -288
  113. package/skills/penetration-testing/SKILL.md +0 -31
  114. package/skills/pennylane/SKILL.md +0 -240
  115. package/skills/phylogenetics/SKILL.md +0 -409
  116. package/skills/pi-agent/SKILL.md +0 -83
  117. package/skills/pkpd-modeling/SKILL.md +0 -381
  118. package/skills/polars/SKILL.md +0 -393
  119. package/skills/polars-bio/SKILL.md +0 -379
  120. package/skills/ponytail/SKILL.md +0 -31
  121. package/skills/ponytail-audit/SKILL.md +0 -18
  122. package/skills/pptx/SKILL.md +0 -246
  123. package/skills/pptx-posters/SKILL.md +0 -258
  124. package/skills/primekg/SKILL.md +0 -99
  125. package/skills/protocolsio-integration/SKILL.md +0 -236
  126. package/skills/pufferlib/SKILL.md +0 -328
  127. package/skills/pydeseq2/SKILL.md +0 -369
  128. package/skills/pydicom/SKILL.md +0 -381
  129. package/skills/pyhealth/SKILL.md +0 -124
  130. package/skills/pylabrobot/SKILL.md +0 -216
  131. package/skills/pymatgen/SKILL.md +0 -404
  132. package/skills/pymc/SKILL.md +0 -310
  133. package/skills/pymoo/SKILL.md +0 -276
  134. package/skills/pyopenms/SKILL.md +0 -179
  135. package/skills/pysam/SKILL.md +0 -330
  136. package/skills/pytdc/SKILL.md +0 -297
  137. package/skills/pytorch-lightning/SKILL.md +0 -191
  138. package/skills/pyzotero/SKILL.md +0 -137
  139. package/skills/qiskit/SKILL.md +0 -259
  140. package/skills/qutip/SKILL.md +0 -317
  141. package/skills/rdkit/SKILL.md +0 -94
  142. package/skills/relsa-severity-assessment/SKILL.md +0 -354
  143. package/skills/research-grants/SKILL.md +0 -296
  144. package/skills/research-grants/references/README.md +0 -287
  145. package/skills/research-lookup/README.md +0 -106
  146. package/skills/research-lookup/SKILL.md +0 -338
  147. package/skills/rowan/SKILL.md +0 -398
  148. package/skills/scanpy/SKILL.md +0 -303
  149. package/skills/scholar-evaluation/SKILL.md +0 -296
  150. package/skills/scientific-brainstorming/SKILL.md +0 -282
  151. package/skills/scientific-critical-thinking/SKILL.md +0 -180
  152. package/skills/scientific-schematics/SKILL.md +0 -370
  153. package/skills/scientific-slides/SKILL.md +0 -379
  154. package/skills/scientific-visualization/SKILL.md +0 -285
  155. package/skills/scientific-writing/SKILL.md +0 -356
  156. package/skills/scikit-bio/SKILL.md +0 -470
  157. package/skills/scikit-learn/SKILL.md +0 -324
  158. package/skills/scikit-survival/SKILL.md +0 -313
  159. package/skills/scvelo/SKILL.md +0 -328
  160. package/skills/scvi-tools/SKILL.md +0 -201
  161. package/skills/seaborn/SKILL.md +0 -254
  162. package/skills/security-auditor/SKILL.md +0 -37
  163. package/skills/shap/SKILL.md +0 -282
  164. package/skills/simpy/SKILL.md +0 -283
  165. package/skills/stable-baselines3/SKILL.md +0 -325
  166. package/skills/statistical-analysis/SKILL.md +0 -446
  167. package/skills/statistical-power/SKILL.md +0 -200
  168. package/skills/statsmodels/SKILL.md +0 -238
  169. package/skills/sympy/SKILL.md +0 -354
  170. package/skills/systematic-debugging/SKILL.md +0 -35
  171. package/skills/tamarind/SKILL.md +0 -285
  172. package/skills/tdd/SKILL.md +0 -26
  173. package/skills/tiledbvcf/SKILL.md +0 -456
  174. package/skills/timesfm-forecasting/SKILL.md +0 -408
  175. package/skills/timesfm-forecasting/examples/global-temperature/README.md +0 -178
  176. package/skills/torch-geometric/SKILL.md +0 -458
  177. package/skills/torchdrug/SKILL.md +0 -241
  178. package/skills/transformers/SKILL.md +0 -195
  179. package/skills/treatment-plans/SKILL.md +0 -174
  180. package/skills/treatment-plans/references/README.md +0 -19
  181. package/skills/umap-learn/SKILL.md +0 -488
  182. package/skills/uncertainty-and-units/SKILL.md +0 -384
  183. package/skills/usfiscaldata/SKILL.md +0 -171
  184. package/skills/vaex/SKILL.md +0 -204
  185. package/skills/venue-templates/SKILL.md +0 -269
  186. package/skills/verification-before-completion/SKILL.md +0 -22
  187. package/skills/waypoint-bio/SKILL.md +0 -273
  188. package/skills/what-if-oracle/SKILL.md +0 -184
  189. package/skills/writing-plans/SKILL.md +0 -15
  190. package/skills/xlsx/SKILL.md +0 -110
  191. package/skills/zarr-python/SKILL.md +0 -241
@@ -1,299 +0,0 @@
1
- ---
2
- name: analytical-method-validation
3
- description: Plan, execute, and document validation, verification, and transfer of analytical procedures under the governing framework - ICH Q2(R2) and Q14, USP <1220>/<1225>/<1226>, ICH M10 bioanalytical, CLSI EP, or ISO/IEC 17025. Use for HPLC, LC-MS/MS, GC, CE, ICP-MS, dissolution, qNMR, qPCR, NIR, and ligand binding or cell-based assays whenever the question is whether a procedure is fit for its intended purpose. Triggers include "method validation", "analytical method validation", "AMV", "validation protocol", "acceptance criteria", "linearity", "reportable range", "accuracy and precision", "repeatability", "intermediate precision", "recovery", "LOD", "LOQ", "detection limit", "quantitation limit", "specificity", "robustness", "method transfer", "method comparison", "Deming", "Passing-Bablok", "Bland-Altman", "equivalence testing", "OOS investigation", "ICH Q2", "Q2(R2)", "Q14", "USP 1225", "ICH M10", "incurred sample reanalysis", "ISR", "CLSI EP", and any request to show that an assay works.
4
- license: MIT
5
- compatibility: Requires Python 3.11+. Scripts use only the standard library - no numpy, scipy, or network access. Statistical distributions are computed from first principles so results are reproducible in any conforming interpreter.
6
- allowed-tools: Read Write Edit Bash
7
- metadata:
8
- version: "1.0"
9
- skill-author: K-Dense Inc.
10
- last-reviewed: "2026-07-27"
11
- ---
12
-
13
- # Analytical Method Validation
14
-
15
- ## When to use
16
-
17
- Any time the question is whether an analytical procedure is fit for its intended purpose:
18
- designing a validation study, evaluating validation data, verifying a compendial procedure,
19
- transferring a procedure to another laboratory or instrument, or defending any of these in a
20
- report.
21
-
22
- ## The two rules
23
-
24
- **1. Establish which framework governs before designing anything.** The same assay validates
25
- differently under ICH Q2(R2), USP <1225>, ICH M10, CLSI EP, and ISO/IEC 17025. They differ in
26
- which characteristics are required, how the studies are laid out, and whether numeric acceptance
27
- criteria are supplied at all. Blending them produces a protocol that satisfies none of them.
28
-
29
- **2. State acceptance criteria before collecting data.** Criteria chosen after seeing results are
30
- not acceptance criteria, and deciding them post hoc is a standing audit finding. ICH Q2(R2)
31
- deliberately supplies almost no numeric criteria — they have to come from the specification, the
32
- analytical target profile (ICH Q14 section 3), or development data. ICH M10 is the exception: it
33
- supplies explicit numbers, and they differ between chromatographic assays and ligand binding
34
- assays.
35
-
36
- ## Scope
37
-
38
- This skill plans studies, computes the statistics correctly, and structures the documentation. It
39
- does **not** decide that a procedure is validated, release a batch, accept or reject a run, close
40
- an investigation, or substitute for the analyst, the technical reviewer, the quality unit, or the
41
- regulator. Every script reports; none of them concludes.
42
-
43
- ## Copyright boundary
44
-
45
- ICH guidelines are published openly and licensed for reuse with acknowledgement, so their
46
- requirements are encoded directly in this skill. **USP general chapters, CLSI EP documents, and
47
- ISO standards are copyrighted and paywalled.** For those, this skill supplies the designation,
48
- scope, and where to obtain an authorised copy — never the text, never invented thresholds. Do not
49
- ask an agent to retrieve, transcribe, or reconstruct their content. If a number matters and it
50
- lives in a paywalled document, read it from the authorised copy.
51
-
52
- ## Frameworks
53
-
54
- ```bash
55
- cd skills/analytical-method-validation/scripts
56
- python3 plan_validation.py --list-frameworks
57
- ```
58
-
59
- | Key | Governs | Numeric criteria supplied |
60
- | --- | --- | --- |
61
- | `ich-q2r2` | Release and stability testing of drug substances and products | Almost none — you derive them |
62
- | `ich-m10` | Bioanalytical concentration measurement (PK, TK, BE) | Yes, and they differ by modality |
63
- | `usp-1220` | Compendial procedure lifecycle, three stages | Paywalled |
64
- | `usp-1225` / `usp-1226` | Validation / verification of compendial procedures | Paywalled |
65
- | `clsi` | Clinical laboratory measurement procedures (EP series) | Paywalled |
66
- | `iso-17025` | Lab-developed and modified methods under accreditation | No — "to the extent necessary" |
67
-
68
- **Q2(R2) replaced Q2(R1) in November 2023 and restructured the characteristics.** Range is now
69
- the parent characteristic (section 3.2), containing *response* (linearity) and *validation of
70
- lower range limits* (DL/QL). Accuracy and precision are section 3.3 and may be evaluated in
71
- combination against a single criterion. Robustness is treated as a development activity and
72
- cross-refers to ICH Q14. Multivariate procedures are addressed explicitly (2.5 and 3.2.2.3), and
73
- Annex 2 adds worked examples for techniques Q2(R1) never covered — quantitative ¹H-NMR, NIR,
74
- quantitative LC/MS, qPCR, biological assays, and particle size. A Q2(R1)-shaped protocol — a flat
75
- list of linearity, range, accuracy, precision, specificity, LOD, LOQ, robustness — is out of date.
76
- Note also the error correction dated 30 November 2023 to Table 5 and Tables 6–11.
77
-
78
- ## Scripts
79
-
80
- ```bash
81
- cd skills/analytical-method-validation/scripts
82
- ```
83
-
84
- | Script | Question answered |
85
- | --- | --- |
86
- | `plan_validation.py` | Which framework, which characteristics, what study layout, what protocol? |
87
- | `check_response.py` | Does the calibration model actually hold across the range? |
88
- | `check_accuracy_precision.py` | What is the recovery, and how much of the variability is between days? |
89
- | `check_detection_limits.py` | What are DL and QL by each allowed approach, and do they serve the reporting threshold? |
90
- | `check_bioanalytical_run.py` | Does this run meet ICH M10 for its modality? |
91
- | `compare_methods.py` | Are two procedures equivalent, at a pre-stated margin? |
92
-
93
- All take `--format table|tsv|json`. Provenance, guideline citations, and caveats go to stderr;
94
- data goes to stdout, so `> out.tsv` keeps them separate. Exit code is `0` for no findings, `1`
95
- when findings were raised, `2` for bad input — so any of them can gate a workflow.
96
-
97
- ## Workflow
98
-
99
- ### 1. Fix the framework and the required characteristics
100
-
101
- ```bash
102
- python3 plan_validation.py --framework ich-q2r2 --attribute assay --technique hplc --range-use assay
103
- ```
104
-
105
- Q2(R2) Table 1 decides what is required from the *measured attribute*, not from the technique. For
106
- an assay: specificity, response, accuracy, repeatability, intermediate precision. For a limit
107
- test: specificity and DL only. For an identity test: specificity alone. Attributes accepted include
108
- `assay`, `impurity` (quantitative), `impurity-limit`, and `identity`.
109
-
110
- Reportable range comes from the specification. Q2(R2) Table 2 gives worked examples — 80–120% of
111
- declared content for an assay, 70–130% for content uniformity, reporting threshold to 120% of the
112
- specification for an impurity.
113
-
114
- ### 2. Generate the protocol and fill in the criteria
115
-
116
- ```bash
117
- python3 plan_validation.py --framework ich-q2r2 --attribute impurity --protocol > protocol.md
118
- ```
119
-
120
- Every bracketed field is a decision to make and record *before* data collection. The protocol
121
- skeleton deliberately refuses to pre-fill acceptance criteria for Q2(R2) work, because there is no
122
- defensible default.
123
-
124
- ### 3. Evaluate the response
125
-
126
- ```bash
127
- python3 check_response.py -i calibration.csv --max-back-calc-error 2
128
- ```
129
-
130
- Input is `level,response`, one row per injection; repeated rows at the same level are replicates,
131
- and supplying them is what makes the linearity test possible.
132
-
133
- Real output from a curve that a coefficient of determination would wave through:
134
-
135
- ```
136
- statistic value
137
- distinct levels 5
138
- slope 166.6000
139
- intercept 2495.0000
140
- intercept CI includes 0 no
141
- coefficient of determination (r2) 0.9830
142
- lack-of-fit F 469.5294
143
- lack-of-fit p 1.5139e-06
144
- runs test p 0.0492
145
-
146
- level n mean_response mean_back_calculated relative_error_pct
147
- 50.0000 2 10075.0000 45.4982 -9.0036
148
- 75.0000 2 15150.0000 75.9604 1.2805
149
- 100.0000 2 20050.0000 105.3721 5.3721
150
- 125.0000 2 24050.0000 129.3818 3.5054
151
- 150.0000 2 26450.0000 143.7875 -4.1417
152
- ```
153
-
154
- r² = 0.983 and the model is unusable: −9.0% back-calculated error at the bottom of the range,
155
- lack-of-fit p = 1.5 × 10⁻⁶, non-random residual signs. **r² is not evidence of linearity** — it
156
- rises with range and is nearly insensitive to curvature. The lack-of-fit F test against pure error
157
- and the residual pattern are the evidence, which is why Q2(R2) 3.2.2.1 asks for an analysis of the
158
- deviation of points from the line rather than a correlation coefficient alone.
159
-
160
- Add `--weight 1/x2` for a wide-range curve. The script flags heteroscedasticity when the residual
161
- variance in the top third of the range exceeds the bottom third by more than 10×, because an
162
- unweighted fit then biases exactly the low end where a reporting threshold lives.
163
-
164
- ### 4. Evaluate accuracy and precision
165
-
166
- ```bash
167
- python3 check_accuracy_precision.py -i ap.csv --accuracy-limit 2 --rsd-limit 1.0 --design-check assay
168
- ```
169
-
170
- Input is `level,measured,group`, where `group` is the intermediate-precision factor — day, analyst,
171
- or instrument.
172
-
173
- ```
174
- level component sd rsd_pct df ci90_low_sd ci90_high_sd
175
- 100 repeatability (within group) 0.0707 0.0707 3 0.0438 0.2065
176
- 100 between-group 1.6515 1.6515 2 n/a n/a
177
- 100 intermediate precision (total) 1.6530 1.6530 2.0037 0.9554 7.2821
178
- ```
179
-
180
- Repeatability of 0.07% RSD looks superb; intermediate precision is 1.65%, twenty-three times
181
- larger, because the variability lives entirely between days. Reporting the within-day figure as
182
- the procedure's precision would understate routine performance by more than an order of magnitude.
183
- This is why the script fits a one-way random-effects model rather than pooling.
184
-
185
- Two traps the script handles for you:
186
-
187
- - **Precision is estimated within each level, never pooled across levels.** Pooling 80/100/120%
188
- results into one standard deviation turns the range itself into apparent imprecision. The script
189
- reports per level, plus a level-independent view as percent of nominal.
190
- - **`--require-ci-within-limit`** enforces that the whole confidence interval sits inside the
191
- limit, not just the mean. Q2(R2) 3.3.1.4 asks for the interval to be *compatible with* the
192
- criterion; a mean that scrapes inside on six replicates has not demonstrated much.
193
-
194
- ### 5. Establish DL and QL, and confirm them
195
-
196
- ```bash
197
- python3 check_detection_limits.py --calibration lowcal.csv --blanks blanks.csv \
198
- --confirm-ql 0.05 --confirm-data ql_check.csv --reporting-threshold 0.05
199
- ```
200
-
201
- ```
202
- approach sigma slope DL QL
203
- sd-and-slope (sigma = residual SD of regression) 7.2816 5033.3490 0.0048 0.0145
204
- sd-and-slope (sigma = SD of y-intercept) 4.3303 5033.3490 0.0028 0.0086
205
- sd-and-slope (sigma = SD of 8 blanks) 3.7702 5033.3490 0.0025 0.0075
206
- ```
207
-
208
- The same data give QL estimates spanning 1.9×, purely from the choice of σ. Q2(R2) 3.2.3.5
209
- therefore requires the limit **and the approach used to determine it** to be reported, and an
210
- estimated limit to be confirmed with samples at or near it. For an impurity procedure the QL must
211
- be at or below the reporting threshold. Reaching for `3.3σ/slope` reflexively, reporting one number
212
- with no named approach, and never confirming it are three separate findings.
213
-
214
- ### 6. Bioanalytical runs under ICH M10
215
-
216
- ```bash
217
- python3 check_bioanalytical_run.py --modality chromatographic --run run1.csv
218
- python3 check_bioanalytical_run.py --modality lba --isr isr.csv
219
- python3 check_bioanalytical_run.py --modality lba --criteria
220
- ```
221
-
222
- `--modality` is mandatory and has no default, because the criteria genuinely differ:
223
-
224
- | | Chromatographic | Ligand binding assay |
225
- | --- | --- | --- |
226
- | Calibration tolerance | ±15%, ±20% at LLOQ | ±20%, ±25% at LLOQ and ULOQ |
227
- | Accuracy / precision | ±15% / ≤15% CV (±20% / ≤20% at LLOQ) | ±20% / ≤20% CV (±25% / ≤25% at LLOQ and ULOQ) |
228
- | A&P design | 4 QC levels, 5 replicates/run, ≥3 runs over ≥2 days | 5 QC levels, 3 replicates/run, ≥6 runs over ≥2 days |
229
- | Total error | no such criterion | ≤30%, ≤40% at LLOQ and ULOQ |
230
- | ISR agreement | ±20% for ≥2/3 of repeats | ±30% for ≥2/3 of repeats |
231
-
232
- Applying the ±15% chromatographic numbers to a ligand binding assay, or importing the LBA total-error
233
- criterion into a chromatographic method, are both common and both wrong.
234
-
235
- The run check enforces the per-level rule that gets missed: at least 2/3 of *all* QCs **and** at
236
- least 50% at *each* level. A run can pass the overall fraction while a single level fails
237
- completely.
238
-
239
- ```
240
- finding: QC level high: 0/2 within tolerance (0%); M10 requires at least 50% at each level
241
- ```
242
-
243
- ### 7. Transfer and method comparison
244
-
245
- ```bash
246
- python3 compare_methods.py -i paired.csv --margin 2 --relative --slope-tolerance 0.05
247
- ```
248
-
249
- ```
250
- mean difference (%) 1.4646
251
- TOST margin 2.0000
252
- TOST p-value 1.0528e-13
253
- 90% CI (TOST) 1.44127 to 1.48797
254
- equivalent at stated margin yes
255
- --- for contrast only ---
256
- paired t-test p (NOT equivalence) 0.0000
257
- OLS slope (biased here) 1.0396
258
- Deming slope 1.0398
259
- Passing-Bablok slope 1.0351
260
- ```
261
-
262
- Two errors this replaces:
263
-
264
- - **"p > 0.05, no significant difference, therefore the methods are equivalent."** Failing to
265
- detect a difference is not evidence of equivalence, and on a small transfer dataset that outcome
266
- is close to guaranteed. TOST tests the hypothesis that matters — that the true difference lies
267
- inside a pre-stated margin. Here the t test says the difference is highly significant *and* TOST
268
- says the methods are equivalent at ±2%; both are true, and only one answers the question.
269
- - **Ordinary least squares for method comparison.** OLS assumes the reference values carry no
270
- error, which is false when comparing two procedures, and biases the slope toward zero. Deming
271
- (with a stated error-variance ratio) and Passing–Bablok (non-parametric, outlier-resistant) are
272
- the appropriate regressions and are reported side by side with OLS for contrast.
273
-
274
- The script also flags proportional bias — when the difference trends with concentration, a single
275
- mean bias and its limits of agreement are misleading regardless of how tight they look.
276
-
277
- ## What this skill exists to prevent
278
-
279
- 1. Validating against ICH Q2(R1)'s structure three years after Q2(R2) replaced it.
280
- 2. Acceptance criteria written after the data were seen.
281
- 3. r² presented as evidence of linearity.
282
- 4. Repeatability reported as the procedure's precision, with the between-day component invisible.
283
- 5. One DL/QL number with no named approach and no confirmation.
284
- 6. Chromatographic M10 criteria applied to a ligand binding assay, or the reverse.
285
- 7. A t test's non-significance presented as equivalence at a method transfer.
286
-
287
- ## References
288
-
289
- - `references/framework-selection.md` — which framework governs, and the questions that decide it
290
- - `references/ich-q2r2.md` — structure, Table 1 and Table 2, per-characteristic recommended data
291
- - `references/ich-m10-bioanalytical.md` — the full chromatographic and LBA criteria side by side
292
- - `references/compendial-and-clsi.md` — USP, CLSI and ISO designations, scope, and how to cite them
293
- - `references/statistics.md` — the statistical methods, why each one, and the common errors
294
- - `references/source-ledger.md` — provenance and research dates for every claim in this skill
295
-
296
- ## Assets
297
-
298
- - `assets/validation-protocol-template.md` — protocol structure with criteria stated up front
299
- - `assets/validation-report-template.md` — report structure with raw-data traceability