fasta

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package fasta decodes and encodes fasta files.

This package uses the format described in: https://en.wikipedia.org/wiki/FASTA_format

This package does not validate sequence characters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fasta

type Fasta struct {
	Name     []byte // Sequence name (without the '>')
	Sequence []byte // Sequence
}

Fasta is a single sequence in a fasta file.

func (*Fasta) MarshalText added in v0.1.17

func (f *Fasta) MarshalText() ([]byte, error)

MarshalText returns the textual representation of f in fasta format. Includes a trailing new line. Always includes a name line, even for empty names. Sequence gets broken down into lines of length 80.

type Reader

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

A Reader reads sequences from a fasta stream.

func NewReader

func NewReader(r io.Reader) *Reader

NewReader returns a new fasta reader that reads from r.

func (*Reader) Read added in v0.1.10

func (r *Reader) Read() (*Fasta, error)

Read reads a single fasta sequence from a stream. Returns EOF only if nothing was read.

Directories

Path Synopsis
Command fastaserver is a server that serves sequences from a fasta file.
Command fastaserver is a server that serves sequences from a fasta file.

Jump to

Keyboard shortcuts

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