feat: structure and sequence annotation bodies; paperspec.structures and paperspec.sequences
Chemical structures (spec/18 section 18.6) and biological sequences (18.7) tied to
the words of a paper. Minor change: two new body kinds, optional properties and
seven rules, with no valid file made invalid.
- annotation schema: structure (SMILES or SMARTS, role, identity, written, label,
accessions, force-field terms) and sequence (alphabet, role, identity, start,
organism, regions, variants); body_kind in sql/store.sql; nine terms in the
JSON-LD context; rules layer.structure.{value,identity,term} and
layer.sequence.{value,identity,region,variant}.
- paperspec.structures reads the atoms and bonds of a SMILES or SMARTS with the
standard library, so a term's atoms are checked without a toolkit; checked against
RDKit on a corpus and random texts. paperspec.sequences checks alphabets,
identities, regions and variants.
- fixtures/records/chemistry (on the main example) and biology (on the draft, which
gains a last sentence), vectors/structures.jsonl and vectors/sequences.jsonl;
check.py runs both layers and the vectors; counts, guides and CHANGELOG updated.
- the prose check no longer takes organism for a UK spelling.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B8cL4zN4XpaQF5cBtASzfq
This commit is contained in:
36 files changed
+1488
-44
No files matched your search
@@ -448,6 +448,41 @@
|
||||
"description": "The exercise kind is unknown.",
|
||||
"chapter": "spec/22-conformance.md"
|
||||
},
|
||||
{
|
||||
"id": "layer.sequence.identity",
|
||||
"description": "A sequence body's identity is not its alphabet, a colon and the first sixteen hex digits of the SHA-256 of its residues with the gaps taken out.",
|
||||
"chapter": "spec/18-layers.md"
|
||||
},
|
||||
{
|
||||
"id": "layer.sequence.region",
|
||||
"description": "A sequence body's region starts after it ends, or reaches outside the residues the value numbers from its start.",
|
||||
"chapter": "spec/18-layers.md"
|
||||
},
|
||||
{
|
||||
"id": "layer.sequence.value",
|
||||
"description": "A sequence body's alphabet is unknown, its value holds a letter its alphabet does not allow, or it holds only gaps.",
|
||||
"chapter": "spec/18-layers.md"
|
||||
},
|
||||
{
|
||||
"id": "layer.sequence.variant",
|
||||
"description": "A sequence body's variant is outside the residues, names a reference residue the value does not have there, changes a residue to itself, or has an alternative its alphabet does not allow.",
|
||||
"chapter": "spec/18-layers.md"
|
||||
},
|
||||
{
|
||||
"id": "layer.structure.identity",
|
||||
"description": "A structure body's identity is not the InChIKey of a SMILES or smiles: or smarts: and the first twelve hex digits of the SHA-256 of its value, or is of the other format than the value.",
|
||||
"chapter": "spec/18-layers.md"
|
||||
},
|
||||
{
|
||||
"id": "layer.structure.term",
|
||||
"description": "A structure body's term cites an atom its value does not write, an atom twice, atoms not joined as its kind needs, a number of atoms or types its kind does not take, or units for values it does not give.",
|
||||
"chapter": "spec/18-layers.md"
|
||||
},
|
||||
{
|
||||
"id": "layer.structure.value",
|
||||
"description": "A structure body's value is not a SMILES or SMARTS as its format says: an unclosed bracket, branch or ring, a stray character, a bond with no atom, or a query in a SMILES.",
|
||||
"chapter": "spec/18-layers.md"
|
||||
},
|
||||
{
|
||||
"id": "layer.trace.source",
|
||||
"description": "A trace's passage is not in the document its source names, its source is the citing document, its selector has no AnchorSelector, or its TextQuoteSelector does not repeat the anchor's plain quote.",
|
||||
|
||||
Reference in new issue
Block a user