Omit unsupported outcome columns from structure availability metadata
Browse files
metadata/supplemental/README.md
CHANGED
|
@@ -17,7 +17,7 @@ mappings remain private.
|
|
| 17 |
| `verification.json` | Exact counts, output hashes, input-table hashes and verification results |
|
| 18 |
|
| 19 |
Source positive/negative, pairing and validation flags do not determine structure availability or binding.
|
| 20 |
-
|
| 21 |
native coordinates, predicted coordinates and mutants; it does not select which files may link.
|
| 22 |
Every literal sequence/context match is eligible. The catalogue supplies sequence-to-file links,
|
| 23 |
not binding outcomes or independent experimental validation.
|
|
|
|
| 17 |
| `verification.json` | Exact counts, output hashes, input-table hashes and verification results |
|
| 18 |
|
| 19 |
Source positive/negative, pairing and validation flags do not determine structure availability or binding.
|
| 20 |
+
Pairing and experimental-validation outcome columns are omitted. Construction provenance distinguishes
|
| 21 |
native coordinates, predicted coordinates and mutants; it does not select which files may link.
|
| 22 |
Every literal sequence/context match is eligible. The catalogue supplies sequence-to-file links,
|
| 23 |
not binding outcomes or independent experimental validation.
|
metadata/supplemental/models.tsv.gz
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:79dd60330666ad5e9e1b4d21fe91193d356a6c6cce5568b3a527084ac64014b7
|
| 3 |
+
size 1702345
|
metadata/supplemental/verification.json
CHANGED
|
@@ -35,8 +35,8 @@
|
|
| 35 |
"sha256": "2c078ef8e349ec84e3c440d533683c14bd5158e3d9acc7b8f8bf91a17722a707"
|
| 36 |
},
|
| 37 |
"metadata/supplemental/models.tsv.gz": {
|
| 38 |
-
"bytes":
|
| 39 |
-
"sha256": "
|
| 40 |
},
|
| 41 |
"metadata/supplemental/record_links.tsv.gz": {
|
| 42 |
"bytes": 261436,
|
|
|
|
| 35 |
"sha256": "2c078ef8e349ec84e3c440d533683c14bd5158e3d9acc7b8f8bf91a17722a707"
|
| 36 |
},
|
| 37 |
"metadata/supplemental/models.tsv.gz": {
|
| 38 |
+
"bytes": 1702345,
|
| 39 |
+
"sha256": "79dd60330666ad5e9e1b4d21fe91193d356a6c6cce5568b3a527084ac64014b7"
|
| 40 |
},
|
| 41 |
"metadata/supplemental/record_links.tsv.gz": {
|
| 42 |
"bytes": 261436,
|
tools/ingest_supplemental.py
CHANGED
|
@@ -16,7 +16,7 @@ import re
|
|
| 16 |
import tarfile
|
| 17 |
import tempfile
|
| 18 |
|
| 19 |
-
FIELDS = ['source_disposition', '
|
| 20 |
'species', 'antigen.epitope', 'mhc.a', 'mhc.b', 'mhc.class', 'cdr3.alpha',
|
| 21 |
'cdr3.beta', 'pdb_id', 'iptm', 'plddt', 'ptm', 'ranking_confidence',
|
| 22 |
'tcr_pmhc_iptm', 'in_spec', 'source_mhc_annotation', 'mhc_context_basis', 'source_mhc_class', 'mhc_class_completed']
|
|
@@ -89,23 +89,17 @@ def sha_file(path):
|
|
| 89 |
|
| 90 |
|
| 91 |
def public_metadata(metadata):
|
| 92 |
-
unknown = set(metadata) - set(FIELDS)
|
| 93 |
if unknown:
|
| 94 |
raise ValueError('Private input metadata contains non-allowlisted field names')
|
| 95 |
out = {key: str(metadata.get(key, '')) for key in FIELDS}
|
| 96 |
# Source flags do not establish binding or eligibility for a sequence/file link.
|
| 97 |
-
out['pairing_status'] = 'unknown'
|
| 98 |
-
out['experimental_validation'] = 'unknown'
|
| 99 |
if out['source_disposition'] == 'mock':
|
| 100 |
out['source_disposition'] = 'predicted'
|
| 101 |
if any(token in value for value in out.values() for token in ['/Users/', '/projects/', '/home/']):
|
| 102 |
raise ValueError('Identifying source path in public metadata')
|
| 103 |
if out['source_disposition'] not in {'native', 'predicted', 'mock', 'mutant', 'unknown'}:
|
| 104 |
raise ValueError('Invalid construction disposition')
|
| 105 |
-
if out['pairing_status'] not in {'reported_assignment', 'constructed_mismatch', 'unknown'}:
|
| 106 |
-
raise ValueError('Invalid pairing status')
|
| 107 |
-
if out['experimental_validation'] not in {'unknown', 'not_applicable'}:
|
| 108 |
-
raise ValueError('Assay results are not permitted')
|
| 109 |
if out['is_native'] not in {'true', 'false'}:
|
| 110 |
raise ValueError('Native status must be explicit')
|
| 111 |
for field in METRICS:
|
|
@@ -376,7 +370,7 @@ def self_check():
|
|
| 376 |
base = dict(source_disposition='predicted', pairing_status='reported_assignment',
|
| 377 |
experimental_validation='unknown', is_native='false')
|
| 378 |
assert public_metadata(base)['iptm'] == ''
|
| 379 |
-
assert
|
| 380 |
assert public_metadata(base | {'source_disposition':'mock'})['source_disposition'] == 'predicted'
|
| 381 |
for extra in [{'y': '1'}, {'source_path': '/private'}, {'iptm': 'inf'}]:
|
| 382 |
try:
|
|
|
|
| 16 |
import tarfile
|
| 17 |
import tempfile
|
| 18 |
|
| 19 |
+
FIELDS = ['source_disposition', 'is_native',
|
| 20 |
'species', 'antigen.epitope', 'mhc.a', 'mhc.b', 'mhc.class', 'cdr3.alpha',
|
| 21 |
'cdr3.beta', 'pdb_id', 'iptm', 'plddt', 'ptm', 'ranking_confidence',
|
| 22 |
'tcr_pmhc_iptm', 'in_spec', 'source_mhc_annotation', 'mhc_context_basis', 'source_mhc_class', 'mhc_class_completed']
|
|
|
|
| 89 |
|
| 90 |
|
| 91 |
def public_metadata(metadata):
|
| 92 |
+
unknown = set(metadata) - set(FIELDS) - {'pairing_status', 'experimental_validation'}
|
| 93 |
if unknown:
|
| 94 |
raise ValueError('Private input metadata contains non-allowlisted field names')
|
| 95 |
out = {key: str(metadata.get(key, '')) for key in FIELDS}
|
| 96 |
# Source flags do not establish binding or eligibility for a sequence/file link.
|
|
|
|
|
|
|
| 97 |
if out['source_disposition'] == 'mock':
|
| 98 |
out['source_disposition'] = 'predicted'
|
| 99 |
if any(token in value for value in out.values() for token in ['/Users/', '/projects/', '/home/']):
|
| 100 |
raise ValueError('Identifying source path in public metadata')
|
| 101 |
if out['source_disposition'] not in {'native', 'predicted', 'mock', 'mutant', 'unknown'}:
|
| 102 |
raise ValueError('Invalid construction disposition')
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
if out['is_native'] not in {'true', 'false'}:
|
| 104 |
raise ValueError('Native status must be explicit')
|
| 105 |
for field in METRICS:
|
|
|
|
| 370 |
base = dict(source_disposition='predicted', pairing_status='reported_assignment',
|
| 371 |
experimental_validation='unknown', is_native='false')
|
| 372 |
assert public_metadata(base)['iptm'] == ''
|
| 373 |
+
assert not {'pairing_status', 'experimental_validation'} & public_metadata(base).keys()
|
| 374 |
assert public_metadata(base | {'source_disposition':'mock'})['source_disposition'] == 'predicted'
|
| 375 |
for extra in [{'y': '1'}, {'source_path': '/private'}, {'iptm': 'inf'}]:
|
| 376 |
try:
|