Crate paf

Source
Expand description

The paf crate parses PAF files. PAF is a Pairwise mApping Format which is commonly used to represent the mapping between two sets of sequences. This crate is based on output produced from minimap2, so please see the documentation of minimap2 to see the full set of fields that can be present in a PAF file.

§Example

use paf::Reader;
use std::env;

fn main() {
    let data = env::args().skip(1).next();

    if let Some(filename) = data {
        let mut reader = Reader::from_path(&filename).unwrap();
        for record in reader.records() {
            let record = record.unwrap();
            println!("{:?}", record);
        }
    } else {
        eprintln!("Usage: print_paf <filename>");
        std::process::exit(1);
    }
}

Structs§

  • An error type for this crate.
  • Struct representing a PAF record.
  • Struct representing a PAF parser iterator.
  • An owned iterator over the records of a PAF file.
  • A borrowed iterator over the records of a PAF file.
  • Struct representing a PAF file writer.

Enums§

  • Specific errors that can happen.
  • Enum representing the possible types of tags.
  • Enum representing the possible types of optional fields.

Type Aliases§

  • A type alias for Result<T, paf::Error>.