Crate brrrr_lib

Source
Expand description

§brrrr

brrrr and in particular, brrrr_lib, is a library for supporting writing genomics file formats in file formats that are usable by general-purpose analytics infrastructure, e.g. Spark.

§Quick Start

For example, to write a FASTA file to the stdout.

use std::io::stdout;

use brrrr_lib::json_writer::fa2jsonl;

fn main() {
    let example_input = b">A\nATCG\n>B\nGCTA" as &[u8];
    fa2jsonl(example_input, &mut stdout()).expect("Error... :(");
}

fa2jsonl relies on JsonRecordWriter, which knows how to parse the input fasta bytes and write them to objects that implement Write.

If you’re interested in the CLI, see: https://github.com/tshauck/brrrr/releases/latest

Modules§

csv_writer
csv_writer holds a writer, and outputs FASTA and GFF records as csv.
errors
Custom brrrr errors.
json_writer
json_writer holds a writer, and outputs FASTA and GFF records as newline delimited json.
parquet_reader
parquet_reader is like parquet_writer, but for reading parquet in.
parquet_writer
parquet_writer holds a writer, and outputs FASTA and GFF records as parquet.
types
Types used within the library.
writer
Interface for the generic writer object.