1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! # Summary
//! This is a package to handle reading of fastx records. 
//!
//! fastx records are defined from fasta or fastq formats but a fastx
//! record is one with an id and sequence regardless of its input format.
//!
//! This package defines the [`FastxRead`] trait, which is implemented by both
//! [`FastaReader`] and [`FastqReader`]. This trait allows these types to be
//! treated as an [`Iterator`] which returns a fastx [`Record`] on each `next()`.
//!
//! This package also handles the creation of a [`FastxRead`] capable reader from
//! the naming of an input file using dynamic dispatch. This utility is found in
//! [`initialize_reader`]. Please see usage for example usages or each items 
//! unit tests.
//!
//! # Usage
//! ## Reading from a file directly
//! This is a very common usecase, where you have some file
//! you'd like to read records from directly. Check out this
//! function directly for more examples.
//! ```
//! use fxread::initialize_reader;
//! let path = "example/sequences.fa";
//! let reader = initialize_reader(path).unwrap();
//! reader
//!     .for_each(|record| println!("{:?}", record));
//! ```

/// Module for fastx records.
pub mod record;

/// Module for the fastxread trait
pub mod fastx;

/// Module for a fastq reader
pub mod fastq;

/// Module for a fasta reader
pub mod fasta;

/// Module for utility functions associated with creating
/// the correct fastx reader.
pub mod utils;

pub use fastx::FastxRead;
pub use fasta::FastaReader;
pub use fastq::FastqReader;
pub use record::Record;
pub use utils::initialize_reader;