Expand description
Convert FASTA records to SBOL 3 documents.
FASTA is the lowest-common-denominator sequence exchange format —
NCBI BLAST, the UniProt downloads, every genome project, and most
bioinformatics tools either emit or accept it. This crate lets
sbol-rs ingest that data with no external dependencies.
Each >header record becomes one sbol::Component paired with
one sbol::Sequence. The component’s biological type
(SBO_DNA / SBO_RNA / SBO_PROTEIN) and the sequence’s EDAM
encoding are auto-detected from the alphabet of the sequence
itself — the caller can override the detection with
FastaImporter::with_alphabet when the data is ambiguous (e.g. a
very short DNA-looking sequence that’s actually a protein).
use sbol_fasta::FastaImporter;
let (document, report) = FastaImporter::new("https://example.org/lab")?
.read_path("genome.fasta")?;
document.check()?;
println!("{} component(s), {} sequence(s)", report.components, report.sequences);FASTA carries no feature annotations — what you get back is a
Component with no SequenceFeatures. If you need annotated data,
reach for sbol-genbank instead.
Structs§
- Fasta
Importer - Imports FASTA records and emits SBOL 3
Documents. - Import
Report - Tally of what a
FastaImporterrun produced.
Enums§
- Alphabet
- Biological type of a FASTA sequence.
- Import
Error - Fatal errors from
FastaImporter. - Import
Warning - Non-fatal issues encountered while importing FASTA.