Crates.io | minced-parser |
lib.rs | minced-parser |
version | 2.0.0 |
source | src |
created_at | 2023-02-05 19:56:38.426561 |
updated_at | 2023-02-15 20:08:12.781568 |
description | A parser for the output of the MinCED CRISPR array annotation tool |
homepage | https://github.com/jimrybarski/minced-parser |
repository | https://github.com/jimrybarski/minced-parser |
max_upload_size | |
id | 777359 |
size | 53,327 |
A Rust parser for the MinCED CRISPR array annotation tool.
Add the following to Cargo.toml:
minced-parser = 2.0.0
use std::fs::File;
use std::io::{BufReader, Read};
fn main() {
let file = File::open("minced.txt").unwrap();
let mut reader = BufReader::new(file);
let mut input = String::new();
reader.read_to_string(&mut input).unwrap();
let contigs = minced_parser::parse(&input).unwrap();
for contig in contigs {
println!("{} has {} arrays", contig.accession, contig.arrays.len());
}
}
Docs are hosted here.