rust-spoa 0.2.4

This crate wraps the C++ SPOA library for generating DNA and protein consensus sequences.
rust-spoa-0.2.4 doesn't have any documentation.

rust-spoa

This crate is a Rust wrapper and interface to the SPOA (simd-accelerated partial order alignment) library. This library allows the efficient generation of a consensus sequence from a set of DNA or protein sequences.

If you use this crate, please cite the original authors of SPOA:

Vaser, R., Sović, I., Nagarajan, N. and Šikić, M., 2017. Fast and accurate de novo genome assembly from long uncorrected reads. Genome research, 27(5), pp.737-746.

To use this crate, add the following to your Cargo.toml:

[dependencies]
rust-spoa = "*"

And add this to your crate root:

extern crate rust_spoa;

For description of the API, see the documentation: Example usage:

extern crate rust_spoa;

use rust_spoa::poa_consensus;

fn main() {
    let mut seqs = vec![];

    // generated each string by adding small tweaks to the expected consensus "AATGCCCGTT"
    for seq in ["ATTGCCCGTT\0",
        "AATGCCGTT\0",
        "AATGCCCGAT\0",
        "AACGCCCGTC\0",
        "AGTGCTCGTT\0",
        "AATGCTCGTT\0"].iter() {
        seqs.push((*seq).bytes().map(|x|{x as u8}).collect::<Vec<u8>>());
    }

    let consensus = poa_consensus(&seqs, 20, 1, 5, -4, -3, -1);

    let expected = "AATGCCCGTT".to_string().into_bytes();
    assert_eq!(consensus, expected);
}