8 breaking releases
new 0.9.0 | Apr 20, 2025 |
---|---|
0.8.0 | Mar 8, 2025 |
0.7.1 | Mar 12, 2022 |
0.6.0 | Mar 9, 2020 |
0.3.0 | Mar 10, 2019 |
#51 in Biology
677 downloads per month
Used in 8 crates
(7 directly)
130KB
3K
SLoC
gb-io
This is a library for parsing and working with Genbank (.gb) files written in Rust. It supports reading, writing, and extracting parts of a sequence while retaining feature annotations.
It should be able to handle most files out there. Feedback, improvements, and details of any .gb files it chokes on are welcome!
Example
Reverse complement a sequence, retaining feature annotations.
extern crate gb_io;
use std::fs::File;
use std::io;
use gb_io::reader::SeqReader;
fn main() {
let file = File::open("mg1655.gb").unwrap();
let stdout = io::stdout();
for seq in SeqReader::new(file) {
let seq = seq.unwrap();
let rc = seq.revcomp();
rc.write(stdout.lock()).unwrap();
}
}
Python bindings
Martin Larralde has written Python
bindings for gb-io
's parser.
Dependencies
~1.5–2.2MB
~44K SLoC