Expand description
Convert GenBank flat-file records to SBOL 3 documents.
GenBank is the de facto exchange format for plasmids, genes, and
parts in molecular biology — SnapGene, ApE, Benchling, the NCBI
Nucleotide database, and SynBioHub all speak it natively. This crate
lets sbol-rs ingest that data without leaving Rust.
Parsing is delegated to gb_io, a mature MIT-licensed nom-based
GenBank parser. The mapping layer in this crate translates each
gb_io::seq::Seq record into an SBOL 3 Component + Sequence
pair, with annotated features becoming SequenceFeatures with
Range locations. Common GenBank feature keys (CDS, promoter,
terminator, RBS, …) are mapped to their canonical Sequence Ontology
IRIs; unrecognized keys pass through under
http://sboltools.org/backport#genbank_feature_kind so the
information survives round-trips.
use sbol_genbank::GenbankImporter;
let (document, report) =
GenbankImporter::new("https://example.org/lab")?.read_path("plasmid.gb")?;
document.check()?;
println!("{} components, {} sequences", report.components, report.sequences);Structs§
- Genbank
Importer - Imports one or more GenBank records and emits SBOL 3
Documentobjects. - Import
Report - Tally of what an
GenbankImporterrun produced. Useful for summarizing CLI output and writing structural tests.
Enums§
- Import
Error - Fatal errors from
GenbankImporter. - Import
Warning - Non-fatal issues encountered while importing GenBank.