[−][src]Module needletail::formats
Functions for reading sequence data from FASTA and FASTQ formats.
Design Note
These functions are designed to take callbacks to process the FASTX records they read. It would be nice to present a FASTX Iterator that downstream users can use at some point, but this is complicated because the lifetimes of the records are linked to the slice of buffer that's being parsed (the records are "zero-copy" so they mustn't outlive the buffer). Perhaps we'll figure out a "streaming iterator" strategy here someday.
See: https://github.com/emk/rust-streaming
Structs
FastaParser | An iterator that parses a buffer into a sequence of FASTARecords |
FastaRecord | A zero-copy reference to a FASTA record in a buffer. |
FastqParser | An iterator that parses a buffer into a sequence of FASTQRecords |
FastqRecord | A zero-copy reference to a FASTQ record in a buffer. |
RecBuffer | A buffer that wraps an object with the |
Traits
RecParser | [⚠️Unstable] RecParser is an adaptor trait that allows new file format
parsers to be defined. It takes a chunk from a RecBuffer ( |
Functions
parse_sequence_path | This is a convenience method for easy drop into CLI programs. It will
take a "path" which is either parsed as a filename or, if "-", as stdin.
It then opens this, does automatic decompression and then determines the
type of the file (which is calls |
parse_sequence_reader | Opens a |