sars 0.1.0

SARS is a Lightweight Suffix Arrays Library for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::fs::File;
use std::io::BufReader;
use bio::io::fasta::Records;
use crate::commons::FastaFilePath;

pub struct FastaFile(pub FastaFilePath);

impl FastaFile {
	pub fn records(&self) -> Records<BufReader<File>> {
		let file = File::open(&self.0).unwrap();
		let fasta_reader = bio::io::fasta::Reader::new(file);
		fasta_reader.records()
	}
}