brrrr_lib/lib.rs
1// (c) Copyright 2020 Trent Hauck
2// All Rights Reserved
3
4#![doc(
5 html_logo_url = "https://raw.githubusercontent.com/tshauck/brrrr/main/brrrr/docs/brrrr-logo.svg",
6 html_favicon_url = "https://raw.githubusercontent.com/tshauck/brrrr/main/brrrr/docs/brrrr-logo.svg"
7)]
8
9//! # brrrr
10//!
11//! `brrrr` and in particular, `brrrr_lib`, is a library for supporting writing genomics file
12//! formats in file formats that are usable by general-purpose analytics infrastructure, e.g.
13//! Spark.
14//!
15//! ## Quick Start
16//!
17//! For example, to write a FASTA file to the stdout.
18//!
19//! ```rust
20//! use std::io::stdout;
21//!
22//! use brrrr_lib::json_writer::fa2jsonl;
23//!
24//! fn main() {
25//! let example_input = b">A\nATCG\n>B\nGCTA" as &[u8];
26//! fa2jsonl(example_input, &mut stdout()).expect("Error... :(");
27//! }
28//! ```
29//!
30//! `fa2jsonl` relies on `JsonRecordWriter`, which knows how to parse the input fasta bytes and
31//! write them to objects that implement `Write`.
32//!
33//! If you're interested in the CLI, see: <https://github.com/tshauck/brrrr/releases/latest>
34
35/// json_writer holds a writer, and outputs FASTA and GFF records as newline delimited json.
36pub mod json_writer;
37
38/// csv_writer holds a writer, and outputs FASTA and GFF records as csv.
39pub mod csv_writer;
40
41/// parquet_writer holds a writer, and outputs FASTA and GFF records as parquet.
42pub mod parquet_writer;
43
44/// parquet_reader is like parquet_writer, but for reading parquet in.
45pub mod parquet_reader;
46
47/// Interface for the generic writer object.
48pub mod writer;
49
50/// Types used within the library.
51pub mod types;
52
53/// Custom brrrr errors.
54pub mod errors;