fastq

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2020 License: BSD-3-Clause Imports: 8 Imported by: 2

Documentation

Overview

Package fastq provides types to read and write FASTQ format files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoder

type Encoder interface {
	Encoding() alphabet.Encoding
}

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

Fastq sequence format reader type.

func NewReader

func NewReader(r io.Reader, template seqio.SequenceAppender) *Reader

Returns a new fastq format reader using r. Sequences returned by the Reader are copied from the provided template.

func (*Reader) Read

func (r *Reader) Read() (seq.Sequence, error)

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. TODO: Does not read multi-line fastq.

type Writer

type Writer struct {
	QID bool // Include ID on +lines
	// contains filtered or unexported fields
}

Fastq sequence format writer type.

func NewWriter

func NewWriter(w io.Writer) *Writer

Returns a new fastq format writer using w.

func (*Writer) Write

func (w *Writer) Write(s seq.Sequence) (n int, err error)

Write a single sequence and return the number of bytes written and any error.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL