You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use an assay when a named test observes one or more variants and emits custom derived report fields.
4
+
5
+
An assay is different from a panel: a panel is a collection of mostly independent observations, while an assay has its own interpretation logic. APOL1 is an assay because it observes G1/G2 sites and reports one derived APOL1 status.
6
+
7
+
## Schema Identity
8
+
9
+
```yaml
10
+
schema: "bioscript:assay:1.0"
11
+
version: "1.0"
12
+
```
13
+
14
+
## Minimal Shape
15
+
16
+
```yaml
17
+
schema: "bioscript:assay:1.0"
18
+
version: "1.0"
19
+
name: "APOL1"
20
+
label: "APOL1 Risk Assay"
21
+
tags:
22
+
- "type:risk"
23
+
- "gene:APOL1"
24
+
25
+
members:
26
+
- kind: "variant"
27
+
path: "g1-site-1.yaml"
28
+
version: "1.0"
29
+
- kind: "variant"
30
+
path: "g1-site-2.yaml"
31
+
version: "1.0"
32
+
- kind: "variant"
33
+
path: "g2-site.yaml"
34
+
version: "1.0"
35
+
36
+
analyses:
37
+
- id: "apol1_status"
38
+
kind: "bioscript"
39
+
path: "apol1.py"
40
+
output_format: "tsv"
41
+
label: "APOL1 risk genotype"
42
+
derived_from:
43
+
- "g1-site-1.yaml"
44
+
- "g1-site-2.yaml"
45
+
- "g2-site.yaml"
46
+
emits:
47
+
- key: "apol1_status"
48
+
label: "APOL1 status"
49
+
value_type: "string"
50
+
format: "badge"
51
+
logic:
52
+
source:
53
+
name: "Example derivation source"
54
+
url: "https://example.org/assay-logic"
55
+
description: >
56
+
Optional human-readable description of the derivation logic implemented by the analysis script.
57
+
```
58
+
59
+
## Members
60
+
61
+
Assay members are currently local variant YAML files:
62
+
63
+
```yaml
64
+
- kind: "variant"
65
+
path: "g1-site-1.yaml"
66
+
version: "1.0"
67
+
```
68
+
69
+
Rules:
70
+
71
+
- `kind` is required and currently must be `variant`
72
+
- `path`is required
73
+
- `version`is recommended
74
+
- keep variant identity, coordinates, alleles, findings, and provenance in the variant YAML files
75
+
76
+
## Analyses
77
+
78
+
Use `analyses` for custom output derived from the member variants. The older `interpretations` key is accepted for compatibility, but new manifests should use `analyses`.
79
+
80
+
Rules:
81
+
82
+
- `id`, `kind`, `path`, and `derived_from` are required
83
+
- `kind`is currently `bioscript`
84
+
- `path`points to a BioScript-compatible Python file
85
+
- `output_format`is optional and defaults to `tsv`; use `json` or `jsonl` when the script writes structured JSON output
86
+
- `derived_from`lists the variant YAML files used by the interpretation
87
+
- `emits`is optional but recommended so report generators know which output columns to display and how to label them
88
+
- `logic`is optional; use `logic.description` and `logic.source.url` to document where the script's derivation rules came from
89
+
90
+
## Findings
91
+
92
+
Use `findings` for evidence that binds either to a variant observation or an emitted analysis value. Keep the executable logic in `analyses`; keep PGx evidence and reporting semantics in YAML.
93
+
94
+
```yaml
95
+
findings:
96
+
- schema: "bioscript:pgx-label:1.0"
97
+
id: "clinpgx_PA166313401"
98
+
label: "ClinPGx drug label annotation PA166313401"
notes: "Drug label annotation applies when APOE status is e4/e4."
116
+
```
117
+
118
+
Binding rules:
119
+
120
+
- `source`is `analysis` or `variant`
121
+
- `analysis` bindings require `analysis_id`, `key`, and either `operator: equals` with `value` or `operator: in` with `values`
122
+
- `variant`bindings require `variant` or `path`, `key`, and either `equals`/`value` or `in`/`values`
123
+
- PGx label findings use `schema: "bioscript:pgx-label:1.0"` and should include `regulatory_sources`, `pgx_action_level` or `prescribing_actions` when known
124
+
- PGx summary findings use `schema: "bioscript:pgx-summary:1.0"` and should include `evidence_level`, `phenotype_categories`, and genotype-specific `effects` when known
125
+
- PGx findings should include `drugs` and should link to the exact ClinPGx/PharmGKB/ClinVar evidence page
126
+
127
+
## Inclusion In Panels
128
+
129
+
A larger panel may include an assay as a member:
130
+
131
+
```yaml
132
+
members:
133
+
- kind: "assay"
134
+
path: "../risk/APOL1/assay.yaml"
135
+
version: "1.0"
136
+
```
137
+
138
+
When a panel includes an assay, the assay's variant observations can be expanded into the panel output, while report tooling can also run the assay's interpretation and include its emitted fields.
Copy file name to clipboardExpand all lines: docs/panel-schema.md
+65-4Lines changed: 65 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
# Panel Schema
2
2
3
-
Use a panel when you want one manifest that points to a curated set of runnable variant records.
3
+
Use a panel when you want one manifest that points to a curated set of runnable variant records, assay manifests, and optional interpretation scripts derived from those records.
4
4
5
-
Right now the Rust runner supports variant members directly. Keep the shape simple.
5
+
The Rust runner supports variant members directly. Test tooling can also run declared interpretation scripts and add their emitted fields to the generated report.
6
6
7
7
## Schema Identity
8
8
@@ -25,9 +25,26 @@ members:
25
25
- kind: "variant"
26
26
path: "variants/rs671.yaml"
27
27
version: "1.0"
28
+
- kind: "assay"
29
+
path: "../risk/APOL1/assay.yaml"
30
+
version: "1.0"
28
31
- kind: "variant"
29
32
path: "variants/rs713598.yaml"
30
33
version: "1.0"
34
+
35
+
analyses:
36
+
- id: "taste_status"
37
+
kind: "bioscript"
38
+
path: "interpretations/taste.py"
39
+
output_format: "tsv"
40
+
label: "Taste status"
41
+
derived_from:
42
+
- "variants/rs713598.yaml"
43
+
emits:
44
+
- key: "taste_status"
45
+
label: "Taste status"
46
+
value_type: "string"
47
+
format: "badge"
31
48
```
32
49
33
50
## Purpose
@@ -37,30 +54,74 @@ A panel is:
37
54
- a selection manifest
38
55
- a stable name for a bundle of variants
39
56
- something the Rust `bioscript` command can run directly
57
+
- a way to include smaller assay manifests in a broader bundle
58
+
- a place to declare interpretation chunks that derive custom report fields from member variants
40
59
41
60
It is not:
42
61
43
62
- a full remote package manager
44
63
- a replacement for richer assay manifests
64
+
- a place to hide variant metadata inside Python when YAML can describe it
45
65
46
66
## Members
47
67
48
-
Each member must currently be:
68
+
Each member must currently be a local variant or assay:
49
69
50
70
```yaml
51
71
- kind: "variant"
52
72
path: "variants/rs671.yaml"
53
73
version: "1.0"
74
+
- kind: "assay"
75
+
path: "../risk/APOL1/assay.yaml"
76
+
version: "1.0"
54
77
```
55
78
56
79
Rules:
57
80
58
81
- `kind`is required
59
82
- exactly one of `path` or `download` is required
60
-
- current runner support is `variant` members only
83
+
- current runner support is local `variant` and `assay` members
61
84
- `version`is recommended for local members
62
85
- `sha256`is optional for local members
63
86
87
+
## Analyses
88
+
89
+
Use `analyses` when a panel needs custom derived output that is not the same thing as a single variant observation. Examples include APOE epsilon genotype from rs429358/rs7412 or APOL1 G0/G1/G2 status from three sites. The older `interpretations` key is accepted for compatibility, but new manifests should use `analyses`.
0 commit comments