fasta

package
v0.0.0-...-25502c3 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2012 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package to read and write FASTA format files

Index

Constants

View Source
const (
	DefaultIDPrefix  = ">"
	DefaultSeqPrefix = ""
)

Default delimiters.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

type Reader struct {
	IDPrefix  []byte
	SeqPrefix []byte
	// contains filtered or unexported fields
}

Fasta sequence format reader type.

func NewReader

func NewReader(f io.Reader, t seqio.SequenceAppender) *Reader

Returns a new fasta format reader using f.

func (*Reader) Read

func (self *Reader) Read() (s seq.Sequence, err error)

Read a single sequence and return it or an error.

type Writer

type Writer struct {
	IDPrefix  []byte
	SeqPrefix []byte
	Width     int
	// contains filtered or unexported fields
}

Fasta sequence format writer type.

func NewWriter

func NewWriter(w io.Writer, width int) *Writer

Returns a new fasta format writer using f.

func (*Writer) Write

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