Rust-Bio 生物信息学工具库 项目简介
Rust-Bio 是一个使用 Rust 实现的生物信息学工具库。Rust-Bio 包括大量的算法和数据结构,对生物信息学非常有帮助。Rust-Bio 通过持续集成进行测试,值得信赖。当前 Rust-Bio 提供:大部分主要模式匹配算法一个方便的字母表实现两两配对后缀数组BWT 和 FM-Indexq-gram 索引rank/select 数据结构示例:// Import some modules
use bio::alphabets;
use bio::data_structures::suffix_array::suffix_array;
use bio::data_structures::bwt::bwt;
use bio::data_structures::fmindex::FMIndex;
use bio::io::fastq;
// Create an FM-Index for a given text.
let alphabet = alphabets::dna::iupac_alphabet();
let pos = suffix_array(text);
let bwt = bwt(text, &pos);
let fmindex = FMIndex::new(&bwt, 3, &alphabet);
// Iterate over a FASTQ file, use the alphabet to validate read
// sequences and search for exact matches in the FM-Index.
let reader = fastq::Reader::from_file("reads.fastq");
for record in reader.records() {
let seq = record.seq();
if alphabet.is_word(seq) {
let interval = fmindex.backward_search(seq.iter());
let positions = interval.occ(&pos);
}
}
use bio::alphabets;
use bio::data_structures::suffix_array::suffix_array;
use bio::data_structures::bwt::bwt;
use bio::data_structures::fmindex::FMIndex;
use bio::io::fastq;
// Create an FM-Index for a given text.
let alphabet = alphabets::dna::iupac_alphabet();
let pos = suffix_array(text);
let bwt = bwt(text, &pos);
let fmindex = FMIndex::new(&bwt, 3, &alphabet);
// Iterate over a FASTQ file, use the alphabet to validate read
// sequences and search for exact matches in the FM-Index.
let reader = fastq::Reader::from_file("reads.fastq");
for record in reader.records() {
let seq = record.seq();
if alphabet.is_word(seq) {
let interval = fmindex.backward_search(seq.iter());
let positions = interval.occ(&pos);
}
}