Add the data annotation body (spec 18.8)
A data body says what kind of data a table, figure panel or passage presents: one of fifteen kinds, the dataset that holds the values, what each field measures (with the dataset's own unit) and the molecules and sequences it is about, by the identities of structure and sequence bodies. Where the values came from stays the dataset's origin. - spec/18 section 18.8, the body in annotation.schema.json, 'data' in the store's body_kind CHECK, five terms in the JSON-LD context. - paperspec.data.problems and the rules layer.data.type, layer.data.quantity, layer.data.subject and layer.data.dataset. Units are compared as strings with the dataset's; no unit library is needed. - fixtures/records/data/ (three annotations on the main example) and vectors/data.jsonl (35 cases); paperspec check covers both, and the determinism rebuild matches. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B8cL4zN4XpaQF5cBtASzfq
This commit is contained in:
25 files changed
+670
-33
No files matched your search
@@ -61,7 +61,7 @@
|
||||
]
|
||||
},
|
||||
"accession": {
|
||||
"description": "An entry of an outside database that a structure or a sequence is: `db` names the database in lower case (pubchem, chebi, cas, uniprot, genbank, refseq, ensembl, pdb) and `id` is the entry's identifier there (spec/18 §18.6).",
|
||||
"description": "An entry of an outside database or vocabulary that a structure, a sequence or some data is, or is of: `db` names it in lower case (pubchem, chebi, cas, uniprot, genbank, refseq, ensembl, pdb, zenodo, geo, edam, chmo) and `id` is the entry's identifier there (spec/18 §18.6).",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"db": {
|
||||
@@ -271,6 +271,54 @@
|
||||
"alt"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"quantity": {
|
||||
"description": "What a field of a dataset measures: `field` is the dataset's field, `name` says what it is in words, and `unit` is the field's unit as the dataset spells it (spec/18 §18.8).",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"field": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"unit": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"field",
|
||||
"name"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"subject": {
|
||||
"description": "A molecule or a sequence that data is about, found by the identity a `structure` or a `sequence` body carries (spec/18 §18.8).",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"kind": {
|
||||
"enum": [
|
||||
"structure",
|
||||
"sequence"
|
||||
]
|
||||
},
|
||||
"identity": {
|
||||
"type": "string",
|
||||
"pattern": "^([A-Z]{14}-[A-Z]{10}-[A-Z]|(smiles|smarts):[0-9a-f]{12}|(protein|dna|rna):[0-9a-f]{16})$"
|
||||
},
|
||||
"label": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"kind",
|
||||
"identity"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
@@ -961,6 +1009,92 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"const": "TextualBody"
|
||||
},
|
||||
"kind": {
|
||||
"const": "data"
|
||||
},
|
||||
"value": {
|
||||
"description": "The data in a few words: what it is and what it is about (spec/18 §18.8).",
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 2000
|
||||
},
|
||||
"data_type": {
|
||||
"description": "What kind of data it is (spec/18 §18.8).",
|
||||
"enum": [
|
||||
"abundance",
|
||||
"benchmark",
|
||||
"binding-affinity",
|
||||
"dose-response",
|
||||
"energy-profile",
|
||||
"force-field-parameters",
|
||||
"geometry",
|
||||
"kinetics",
|
||||
"other",
|
||||
"physical-property",
|
||||
"sequence-property",
|
||||
"simulation-observable",
|
||||
"spectrum",
|
||||
"thermodynamics",
|
||||
"variant-effect"
|
||||
]
|
||||
},
|
||||
"role": {
|
||||
"enum": [
|
||||
"reports",
|
||||
"uses"
|
||||
]
|
||||
},
|
||||
"dataset": {
|
||||
"description": "The dataset (spec/15) that holds the values.",
|
||||
"$ref": "common.schema.json#/$defs/datasetId"
|
||||
},
|
||||
"label": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"method": {
|
||||
"description": "How the data was obtained, in the paper's words.",
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"quantities": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/quantity"
|
||||
},
|
||||
"minItems": 1
|
||||
},
|
||||
"subjects": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/subject"
|
||||
},
|
||||
"minItems": 1
|
||||
},
|
||||
"accessions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/accession"
|
||||
},
|
||||
"minItems": 1,
|
||||
"uniqueItems": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"kind",
|
||||
"value",
|
||||
"data_type",
|
||||
"role"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Reference in new issue
Block a user