Skip to content

Commit 6c61340

Browse files
committed
Merge branch 'postmerge-example-validation-docs'
2 parents a1e0ab0 + 77f128c commit 6c61340

9 files changed

Lines changed: 549 additions & 7 deletions

File tree

README.md

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ A comprehensive toolkit for integrating structural models into the AlphaFold Dat
2121
- [Quick Start](#quick-start)
2222
- [Verify Installation](#verify-installation)
2323
- [Basic Usage Example](#basic-usage-example)
24+
- [Validate Example Outputs](#validate-example-outputs)
2425
- [Usage](#usage)
2526
- [ModelCIF Generator](#modelcif-generator)
2627
- [CIF to BCIF Converter](#cif-to-bcif-converter)
@@ -274,6 +275,44 @@ uv run main.py run-dssp \
274275
-o output/AF-0000000000000001-model-v1.cif
275276
```
276277

278+
### Validate Example Outputs
279+
280+
The committed end-to-end examples under [`examples/`](examples/README.md)
281+
can be validated directly from the repo root. Use `model-summary` for committed
282+
e2e `model_jsons/*.json`; the canonical `model` schema remains reserved for
283+
full model metadata entries and `AF-metadata-*-of-*.json` batches.
284+
285+
```bash
286+
# Summary and provider metadata JSONs
287+
.venv/bin/python main.py run-schema-validation \
288+
-i examples/colabfold_monomer_e2e/model_jsons/AF-0000000300000001.json \
289+
-t model-summary
290+
.venv/bin/python main.py run-schema-validation \
291+
-i examples/colabfold_monomer_e2e/config/provider.json \
292+
-t provider
293+
294+
# Score JSONs and confidence/PAE relationship
295+
.venv/bin/python main.py validate-plddt-file \
296+
--file examples/colabfold_monomer_e2e/scores/AF-0000000300000001-confidence_v1.json
297+
.venv/bin/python main.py validate-pae-file \
298+
--file examples/colabfold_monomer_e2e/scores/AF-0000000300000001-predicted_aligned_error_v1.json
299+
.venv/bin/python main.py validate-relationships-pair \
300+
--plddt-file examples/colabfold_monomer_e2e/scores/AF-0000000300000001-confidence_v1.json \
301+
--pae-file examples/colabfold_monomer_e2e/scores/AF-0000000300000001-predicted_aligned_error_v1.json
302+
303+
# ModelCIF dictionary validation
304+
gemmi validate -p -d mmcif_ma.dic \
305+
examples/colabfold_monomer_e2e/modelcif/AF-0000000300000001-model_v1.cif
306+
```
307+
308+
For manual coordinate-file sanity checks, open representative PDB, ModelCIF,
309+
and BCIF files in the Mol* web viewer at https://molstar.org/viewer/. Drag and
310+
drop the files into the browser window, or use **Open Files** in the left
311+
panel. The structure should open correctly, no error messages should be shown
312+
in the viewer, and the structure should look structurally correct by eye. The
313+
same representative files can also be opened in ChimeraX or PyMOL; expect a
314+
clean import with no parser errors.
315+
277316
## Usage
278317

279318
### ColabFold conversion
@@ -420,11 +459,13 @@ Use these commands to sanity-check individual artifacts or entire datasets befor
420459

421460
#### Schema Validation
422461

423-
Validate metadata JSON files (`model` or `provider`) against the required JSON schemas to ensure data consistency and compliance.
462+
Validate metadata JSON files against the required JSON schemas to ensure data consistency and compliance.
424463

425464
**Schemas:**
426465

427-
* Model: `afdb_integration_kit/metadata/resources/model_schema.json`
466+
* Model: `afdb_integration_kit/metadata/resources/model_schema.json` for full model metadata entries and batches
467+
* Model summary: `afdb_integration_kit/metadata/resources/model_summary_schema.json` for e2e `model_jsons/*.json` and search summary documents
468+
* Collection doc: `afdb_integration_kit/metadata/resources/collection_doc_schema.json` for e2e `chain_jsons/*.json` and collection documents
428469
* Provider: `afdb_integration_kit/metadata/resources/provider_schema.json`
429470

430471
**Command:**
@@ -436,12 +477,14 @@ uv run main.py run-schema-validation -i <metadata_json_file> -t <type>
436477
**Parameters:**
437478

438479
* `-i, --input`: Path to the metadata JSON file to validate
439-
* `-t, --type`: Type of metadata to validate (`model` or `provider`)
480+
* `-t, --type`: Type of metadata to validate (`model`, `model-summary`, `collection-doc`, or `provider`)
440481

441482
**Examples:**
442483

443484
```bash
444485
uv run main.py run-schema-validation -i model.json -t model
486+
uv run main.py run-schema-validation -i model_summary.json -t model-summary
487+
uv run main.py run-schema-validation -i collection_doc.json -t collection-doc
445488
uv run main.py run-schema-validation -i provider.json -t provider
446489
```
447490

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"title": "Collection Document Metadata Schema",
4+
"type": "object",
5+
"required": [
6+
"uniqueId",
7+
"toolUsed",
8+
"modelCreatedDate",
9+
"modelEntityId",
10+
"isComplex",
11+
"complexName",
12+
"uniprotAccession",
13+
"uniprotId",
14+
"uniprotDescription",
15+
"gene",
16+
"taxId",
17+
"organismScientificName",
18+
"assemblyType",
19+
"oligomericState",
20+
"sequence",
21+
"sequenceChecksum",
22+
"sequenceVersionDate",
23+
"sequenceStart",
24+
"sequenceEnd",
25+
"isIsoform",
26+
"isFragment",
27+
"isUniProt",
28+
"isUniProtReferenceProteome",
29+
"isUniProtReviewed",
30+
"globalMetricValue",
31+
"fractionPlddtVeryLow",
32+
"fractionPlddtLow",
33+
"fractionPlddtConfident",
34+
"fractionPlddtVeryHigh",
35+
"latestVersion",
36+
"allVersions",
37+
"providerId",
38+
"entityType",
39+
"isAMdata"
40+
],
41+
"properties": {
42+
"uniqueId": {
43+
"type": "string",
44+
"pattern": "^AF-[0-9]{16}_v[0-9]+_[A-Za-z0-9]+$"
45+
},
46+
"toolUsed": {
47+
"type": "string"
48+
},
49+
"modelCreatedDate": {
50+
"type": "string",
51+
"format": "date-time"
52+
},
53+
"modelEntityId": {
54+
"type": "string",
55+
"pattern": "^AF-[0-9]{16}$"
56+
},
57+
"isComplex": {
58+
"type": "boolean"
59+
},
60+
"complexName": {
61+
"type": ["string", "null"]
62+
},
63+
"uniprotAccession": {
64+
"type": ["string", "null"]
65+
},
66+
"uniprotId": {
67+
"type": ["string", "null"]
68+
},
69+
"uniprotDescription": {
70+
"type": ["string", "null"]
71+
},
72+
"gene": {
73+
"type": ["string", "null"]
74+
},
75+
"geneSynonyms": {
76+
"type": "array",
77+
"items": { "type": "string" }
78+
},
79+
"taxId": {
80+
"type": ["integer", "null"]
81+
},
82+
"organismScientificName": {
83+
"type": ["string", "null"]
84+
},
85+
"organismScientificNameT": {
86+
"type": ["string", "null"]
87+
},
88+
"organismCommonNames": {
89+
"type": "array",
90+
"items": { "type": "string" }
91+
},
92+
"organismSynonyms": {
93+
"type": "array",
94+
"items": { "type": "string" }
95+
},
96+
"assemblyType": {
97+
"type": ["string", "null"],
98+
"enum": ["Homo", "Hetero", null]
99+
},
100+
"oligomericState": {
101+
"type": ["string", "null"]
102+
},
103+
"oligomericStateDescription": {
104+
"type": ["string", "null"]
105+
},
106+
"sequence": {
107+
"type": "string"
108+
},
109+
"sequenceChecksum": {
110+
"type": "string",
111+
"pattern": "^[a-fA-F0-9]{32}$"
112+
},
113+
"sequenceVersionDate": {
114+
"type": ["string", "null"],
115+
"format": "date-time"
116+
},
117+
"sequenceStart": {
118+
"type": "integer",
119+
"minimum": 1
120+
},
121+
"sequenceEnd": {
122+
"type": "integer",
123+
"minimum": 1
124+
},
125+
"isIsoform": {
126+
"type": "boolean"
127+
},
128+
"isFragment": {
129+
"type": "boolean"
130+
},
131+
"isUniProt": {
132+
"type": "boolean"
133+
},
134+
"isUniProtReferenceProteome": {
135+
"type": "boolean"
136+
},
137+
"isUniProtReviewed": {
138+
"type": "boolean"
139+
},
140+
"globalMetricValue": {
141+
"type": "number"
142+
},
143+
"fractionPlddtVeryLow": {
144+
"type": "number"
145+
},
146+
"fractionPlddtLow": {
147+
"type": "number"
148+
},
149+
"fractionPlddtConfident": {
150+
"type": "number"
151+
},
152+
"fractionPlddtVeryHigh": {
153+
"type": "number"
154+
},
155+
"latestVersion": {
156+
"type": "integer",
157+
"minimum": 1
158+
},
159+
"allVersions": {
160+
"type": "array",
161+
"items": { "type": "integer" },
162+
"minItems": 1
163+
},
164+
"providerId": {
165+
"type": "string"
166+
},
167+
"entityType": {
168+
"type": "string"
169+
},
170+
"isAMdata": {
171+
"type": "boolean"
172+
},
173+
"complexComposition": {
174+
"type": ["string", "null"],
175+
"pattern": "^[A-Za-z0-9-]+_[1-9][0-9]*(,[A-Za-z0-9-]+_[1-9][0-9]*)*$"
176+
},
177+
"_version_": {
178+
"type": "integer"
179+
}
180+
},
181+
"patternProperties": {
182+
"^complexPredictionAccuracy_[A-Za-z0-9_]+$": {
183+
"type": ["number", "null"]
184+
}
185+
},
186+
"additionalProperties": false
187+
}

0 commit comments

Comments
 (0)