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
@@ -0,0 +1,3 @@
|
||||
{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"alphabet":"protein","identity":"protein:5807fcbf6d5567ca","kind":"sequence","label":"HP35","organism":"Gallus gallus","role":"names","start":42,"type":"TextualBody","value":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF"},"created":"2026-10-14T09:00:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/s05a5q9qa4bhj","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","receipt":"b09z8grf3mrs4","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"villin headpiece subdomain HP35","prefix":"We test the charges on the ","suffix":", LSDEDFKAVFGMTRSAFANLPLWKQQNLKK"},"rev":0,"span":[27,58],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"villin headpiece subdomain HP35","prefix":"We test the charges on the ","suffix":", LSDEDFKAVFGMTRSAFANLPLWKQQNLKK","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"}
|
||||
{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"alphabet":"protein","identity":"protein:5807fcbf6d5567ca","kind":"sequence","label":"HP35","regions":[{"end":51,"label":"helix 1","start":44},{"end":59,"label":"helix 2","start":55},{"end":74,"label":"helix 3","start":63}],"role":"depicts","start":42,"type":"TextualBody","value":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF"},"created":"2026-10-14T09:05:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/s04e0n9y6wger","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","receipt":"b09z8grf3mrs4","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant."},"rev":0,"span":[60,95],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant.","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"}
|
||||
{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"alphabet":"protein","identity":"protein:5807fcbf6d5567ca","kind":"sequence","label":"HP35 N68H","role":"reports","start":42,"type":"TextualBody","value":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","variants":[{"alt":"H","position":68,"ref":"N"}]},"created":"2026-10-14T09:10:00Z","creator":{"id":"tag:scient.ing,2026:software:example-model","name":"A model (illustrative)","type":"Software"},"id":"tag:scient.ing,2026:annotation:smithlab/n8pvfne6pkb9z","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","status":"proposed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"N68H","prefix":"FANLPLWKQQNLKKEKGLF, and on its ","suffix":" variant."},"rev":0,"span":[108,112],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"N68H","prefix":"FANLPLWKQQNLKKEKGLF, and on its ","suffix":" variant.","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"}
|
||||
@@ -0,0 +1 @@
|
||||
{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"audience":"expert","created":"2026-10-14T09:00:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"docs":["smithlab/writer2027fixed-ynr7.v3"],"format":"scienting-layer/1","id":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","label":"Sequences in the draft","license":{"spdx":"CC-BY-4.0"},"project":"smithlab-charges","purpose":"The peptide the draft tests its charges on, its helices and its variant.","total":3,"type":"AnnotationCollection","visibility":"team"}
|
||||
@@ -0,0 +1 @@
|
||||
{"at":"2026-10-14T09:30:00Z","by":"ana","doc":"writer2027fixed-ynr7.v3","evidence":[],"format":"scienting-receipt/1","id":"b09z8grf3mrs4","level":"F3","nodes":[],"records":[["annotation","s04e0n9y6wger","bff8ef0d11e39c9aaffd0434a5f648d60ab05e876f5ff4c5ad31dff861196e8f"],["annotation","s05a5q9qa4bhj","81373fb287b77a6f523085bdc9647cc2d3c72f0d1fcbfa541ed074019f821db5"]],"rev":0,"root":"df2012c1d4da1f09d001e7595e7ff466aba7c915fc5e203624d274bafb83183e","scope":"targeted:sequences","signature":{"key":"ana","scheme":"ed25519","value":"TA4GpuntRYraJ/q3WdfPNWQfy5SlAxSrsTv+Wb1lH0TeH/QNSFWLU3FatOhhSYpgkbgkYTHBuCduODIr3dGPCQ=="}}
|
||||
Reference in new issue
Block a user