Skip to content

Commit e6faeb8

Browse files
committed
updating README.md
1 parent 549484a commit e6faeb8

2 files changed

Lines changed: 22 additions & 4 deletions

File tree

microBioRust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "microBioRust"
3-
version = "0.1.1"
3+
version = "0.1.2"
44
edition = "2021"
55
license = "MIT"
66
keywords = ["bioinformatics", "micro", "bio", "genomics", "sequence-analysis"]

microBioRust/README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,29 @@
44

55
The aim of this crate is to provide Microbiology friendly Rust functions for bioinformatics.<br>
66

7-
To use a specific workspace (at the moment microSeqIO or heatmap) clone the project, cd into the specific directory required and build the project from there
7+
To use a specific workspace, clone the project from GitHub, cd into the specific directory required and build the project from there
88

9-
In microSeqIO:
9+
You can parse genbank files and convert to a GFF (gff3) format as well as extracting DNA sequences, gene DNA sequences (ffn) and protein fasta sequences (faa)
10+
You can also parse embl files and convert to a GFF (gff3) format as well as extracting the DNA sequences, gene DNA sequences (ffn) and protein fasta sequences (faa). You can also convert the embl to a gbk format.
11+
There's now a pyo3 with Python Interop where you can import as a PyModule.
1012

11-
You can parse genbank files and save as a GFF (gff3) format as well as extracting DNA sequences, gene DNA sequences (ffn) and protein fasta sequences (faa)
13+
The simple way: parsing your genbank or embl file using the genbank! or embl! macros
14+
15+
```rust
16+
17+
pub fn genbank_to_faa(filename: &str) -> Result<(), anyhow::Error> {
18+
let records = genbank!(&filename);
19+
for record in records.iter() {
20+
for (k, _v) in &record.cds.attributes {
21+
if let Some(seq) = record.seq_features.get_sequence_faa(k) {
22+
println!(">{}|{}\n{}", &record.id, &k, seq);
23+
}
24+
}
25+
}
26+
return Ok(());
27+
}
28+
29+
better for debugging
1230

1331
```rust
1432

0 commit comments

Comments
 (0)