1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::fs::File;
use std::io::{BufReader, Read};

fn main() {
    let file = File::open("examples/example.txt").unwrap();
    let mut reader = BufReader::new(file);
    let mut input = String::new();
    reader.read_to_string(&mut input).unwrap();
    let arrays = pilercr_parser::parse(&input).unwrap();
    for array in arrays {
        println!(
            "{} has {} arrays",
            array.accession,
            array.repeat_spacers.len()
        );
    }
}