| Crates.io | gb-io |
| lib.rs | gb-io |
| version | 0.9.0 |
| created_at | 2019-03-01 09:36:53.413324+00 |
| updated_at | 2025-04-20 00:52:46.735752+00 |
| description | A library for parsing, writing and manipulating Genbank sequence files |
| homepage | https://github.com/dlesl/gb-io |
| repository | https://github.com/dlesl/gb-io |
| max_upload_size | |
| id | 117940 |
| size | 140,534 |
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!
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();
}
}
Martin Larralde has written Python
bindings for gb-io's parser.