trfr 0.1.2

Parse Tandem Repeat Finder .dat files
Documentation
  • Coverage
  • 87.5%
    28 out of 32 items documented1 out of 1 items with examples
  • Size
  • Source code size: 41.67 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 5.34 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Euphrasiologist/trfr
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Euphrasiologist

trfr

The trfr crate is purely for parsing the output of the command line tool Tandem Repeat Finder (or trf).

The output is generated by passing the -d flag to createa parseable table (rather than the standard HTML output). Please see here for the source code and citation for trf.

The API follows that of most mainstream Rust API's (in particular BurntSushi's). It is an iterator API.

Example

use std::{error::Error, io, process};

fn example() -> Result<(), Box<dyn Error>> {
    // Build the trfr reader
    // and assuming you are parsing with `-d` flag only
    let mut rdr = trfr::Reader::from_reader(io::stdin(), trfr::Flag::D);
    for result in rdr.records() {
        let record = result?;
        println!("{:?}", record);
    }
    Ok(())
}

fn main() {
    if let Err(err) = example() {
        println!("error running example: {}", err);
        process::exit(1);
    }
}