Expand description
Bit-packed and well-typed biological sequences
- [Seq] heap allocated sequences of variable length
- [Kmer] short fixed length sequences
- [Codec] coder/decoder implementations
This crate is designed to facilitate common bioinformatics tasks, incuding amino acid translation, k-mer minimisation and hashing, and nucleotide sequence manipulation.
use bio_seq::prelude::*;
let seq = dna!("ATACGATCGATCGATCGATCCGT");
// iterate over the 8-mers of the reverse complement
for kmer in seq.revcomp().kmers::<8>() {
println!("{}", kmer);
}
Custom encodings are supported with the help of the bio-seq-derive
crate.
use bio_seq::prelude::*;
let seq = iupac!("AGCTNNCAGTCGACGTATGTA");
let pattern = Seq::<Iupac>::from_str("AYG").unwrap();
for slice in seq.windows(pattern.len()) {
if pattern.contains(slice) {
println!("{} matches pattern", slice);
}
}
Re-exports
pub use error::ParseBioError;
Modules
- Coding/Decoding trait for bit-packable enums representing biological alphabets
- Genetic Code Translation