fastq

package
v0.0.0-...-7b6cf24 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2012 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package 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 Reader

type Reader struct {
	Encoding seq.Encoding
	// contains filtered or unexported fields
}

Fastq sequence format reader type.

func NewReader

func NewReader(f io.ReadCloser) *Reader

Returns a new fastq format reader using r.

func NewReaderName

func NewReaderName(name string) (r *Reader, err error)

Returns a new fastq format reader using a filename.

func (*Reader) Close

func (self *Reader) Close() (err error)

Close the reader.

func (*Reader) Read

func (self *Reader) Read() (sequence *seq.Seq, err error)

Read a single sequence and return it or an error. TODO: Does not read interleaved fastq.

func (*Reader) Rewind

func (self *Reader) Rewind() (err error)

Rewind the reader.

type Writer

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

Fastq sequence format writer type.

func NewWriter

func NewWriter(f io.WriteCloser) *Writer

Returns a new fastq format writer using w.

func NewWriterName

func NewWriterName(name string) (w *Writer, err error)

Returns a new fastq format writer using a filename, truncating any existing file. If appending is required use NewWriter and os.OpenFile.

func (*Writer) Close

func (self *Writer) Close() (err error)

Close the writer, flushing any unwritten sequence.

func (*Writer) Flush

func (self *Writer) Flush() error

Flush the writer.

func (*Writer) Write

func (self *Writer) Write(s *seq.Seq) (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