Skip to main content

Crate sbol_utilities

Crate sbol_utilities 

Source
Expand description

Biology-first construction helpers for sbol-rs, in the spirit of the Python sbol_utilities package.

The verbs read as inherent methods on sbol3::design::Design via the ComponentVerbs extension trait. Import the prelude to light them up:

use sbol3::design::Design;
use sbol_utilities::prelude::*;

let mut d = Design::new("https://example.org/lab").unwrap();
let plac = d.promoter("pLac", "caatacg").description("LacI-repressible").add();
let b0034 = d.rbs("B0034", "ttgaac").add();
d.engineered_region("pLac_tu", [plac, b0034]).add();
let doc = d.finish().unwrap();
assert_eq!(doc.components().count(), 3); // pLac, B0034, pLac_tu

Re-exports§

pub use combinatorial::ExpandError;
pub use combinatorial::expand_derivation;
pub use combinatorial::expand_derivations;
pub use compute_sequence::ComputeSequenceError;
pub use compute_sequence::compute_all_sequences;
pub use compute_sequence::compute_sequence;
pub use verbs::FunctionalComponentDraft;
pub use verbs::MoleculeVerbs;

Modules§

combinatorial
Expanding an SBOL 3 CombinatorialDerivation into concrete variant Components gathered in a Collection.
compute_sequence
Computing the sequence of an assembled region from its ordered parts.
prelude
Common imports for authoring designs with the biology verbs.
verbs
Further biology-first construction verbs that complement ComponentVerbs, covering RNA, protein, and abstract functional components. Like the core verbs, they read as inherent methods on sbol3::design::Design; import the crate prelude to bring them into scope.

Structs§

PartDraft
In-progress DNA part (a Component plus its Sequence), created by the part verbs. The sequence is registered automatically; .add() returns only the component handle.
RegionDraft
In-progress engineered region, created by engineered_region.

Enums§

Molecule
The molecule type of a biological part. It sets both the Component type (SBO_DNA / SBO_RNA / SBO_PROTEIN) and the matching sequence encoding, so a part verb states its chemistry once.
Part
A member of an engineered_region: either a Component (wrapped in a fresh sub-component with its roles copied) or a detached feature (used as configured). This mirrors the Python Union[Component, SubComponent].

Traits§

ComponentVerbs
Biology-first construction verbs, implemented on Design.