Crate paf

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§

Error
An error type for this crate.
PafRecord
Struct representing a PAF record.
Reader
Struct representing a PAF parser iterator.
RecordsIntoIter
An owned iterator over the records of a PAF file.
RecordsIter
A borrowed iterator over the records of a PAF file.
Writer
Struct representing a PAF file writer.

Enums§

ErrorKind
Specific errors that can happen.
Tag
Enum representing the possible types of tags.
Type
Enum representing the possible types of optional fields.

Type Aliases§

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