Function pilercr_parser::parse
source · pub fn parse(input: &str) -> Result<Vec<Array<'_>>, Err<Error<&str>>>Expand description
Parses the output of PILER-CR for a single contig/genome.
Examples found in repository?
examples/parse_file.rs (line 9)
4 5 6 7 8 9 10 11 12 13 14 15 16 17
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()
);
}
}