Expand description
§rtemis-a3
Rust implementation of the A3 (Amino Acid Annotation) format.
A3 is a structured format for annotating amino acid sequences with site, region, post-translational modification, processing, and variant information.
§Quick start
use rtemis_a3::{a3_from_json, a3_to_json};
let json = r#"{
"$schema": "https://schema.rtemis.org/a3/v1/schema.json",
"a3_version": "1.0.0",
"sequence": "MAEPRQ",
"annotations": { "site": {}, "region": {}, "ptm": {}, "processing": {}, "variant": [] },
"metadata": { "uniprot_id": "", "description": "", "reference": "", "organism": "" }
}"#;
let a3 = a3_from_json(json).unwrap();
assert_eq!(a3.sequence(), "MAEPRQ");§Module layout
error—A3Errorenumtypes— data model structs and enumsnormalization— pure helpers: sort, deduplicate, overlap checkvalidation— two-stage validation (structural then contextual)
Re-exports§
pub use error::A3Error;pub use types::A3;pub use types::A3_SCHEMA_URI;pub use types::A3_VERSION;pub use types::A3Index;pub use types::Annotations;pub use types::FlexEntry;pub use types::Metadata;pub use types::RegionEntry;pub use types::SiteEntry;pub use types::VariantRecord;pub use validation::validate;
Modules§
- error
- Error types for the rtemis-a3 library.
- normalization
- Pure normalization helpers.
- types
- Data model for the A3 format.
- validation
- Two-stage A3 validation.
Functions§
- a3_
from_ json - Parse and validate an A3 JSON string.
- a3_
to_ json - Serialize a validated
A3to a JSON string. - residue_
at - Return the amino acid character at a 1-based
position. - variants_
at - Return all variant records at a 1-based
position.