Documentation ¶
Overview ¶
Package fasta provides types to read and write FASTA format files.
Index ¶
Constants ¶
const ( DefaultIDPrefix = ">" DefaultSeqPrefix = "" )
Default delimiters.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
Fasta sequence format reader type.
func NewReader ¶
func NewReader(f io.Reader, template seqio.SequenceAppender) *Reader
Returns a new fasta format reader using f. Sequences returned by the Reader are copied from the provided template.
func (*Reader) Read ¶
Read a single sequence and return it and potentially an error. Note that a non-nil returned error may be associated with a valid sequence, so it is the responsibility of the caller to examine the error to determine whether the read was successful. Note that if the Reader's template type returns different non-nil error values from calls to SetName and SetDescription, a new error string will be returned on each call to Read. So to allow direct error comparison these methods should return the same error.