Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dlesl/gb-io
A Rust library for parsing, writing and manipulating Genbank sequence files
https://github.com/dlesl/gb-io
biology genbank rust
Last synced: 2 months ago
JSON representation
A Rust library for parsing, writing and manipulating Genbank sequence files
- Host: GitHub
- URL: https://github.com/dlesl/gb-io
- Owner: dlesl
- License: mit
- Created: 2018-09-20T19:42:23.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-13T18:35:37.000Z (about 1 year ago)
- Last Synced: 2024-10-08T15:19:40.915Z (3 months ago)
- Topics: biology, genbank, rust
- Language: Rust
- Homepage:
- Size: 3.61 MB
- Stars: 14
- Watchers: 2
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gb-io
[![crates.io link](https://img.shields.io/crates/v/gb-io.svg)](https://crates.io/crates/gb-io)
[![docs.rs link](https://docs.rs/gb-io/badge.svg)](https://docs.rs/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.```rust
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](https://github.com/althonos) has written [Python
bindings](https://pypi.org/project/gb-io/) for `gb-io`'s parser.