phylip

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2017 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FASTA_LINE_LEN   = 80 // max line length for fasta output
	FASTA_INITIAL_NB = 2  // max line length for fasta output
)
View Source
const (
	PHYLIP_LINE  = 60
	PHYLIP_BLOCK = 10
)

Variables

This section is empty.

Functions

func WriteAlignment

func WriteAlignment(al align.Alignment, strict bool) string

Types

type Parser

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

Parser represents a parser.

func NewParser

func NewParser(r io.Reader, strict bool) *Parser

NewParser returns a new instance of Parser.

func (*Parser) Parse

func (p *Parser) Parse() (align.Alignment, error)

Parse parses a phylip alignment

func (*Parser) ParseMultiple added in v0.1.1

func (p *Parser) ParseMultiple(aligns chan<- align.Alignment) error

Parses mutliple phylip alignments and give them to the channel At the end (or in case of error), it closes the channel

type Scanner

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

Scanner represents a lexical scanner.

func NewScanner

func NewScanner(r io.Reader) *Scanner

NewScanner returns a new instance of Scanner.

func (*Scanner) Read added in v0.2.2

func (s *Scanner) Read(n int) string

reads the next n runes from the bufferred reader.

func (*Scanner) Scan

func (s *Scanner) Scan() (tok Token, lit string)

Scan returns the next token and literal value.

type Token

type Token int64
const (
	ILLEGAL    Token = iota
	INTEGER          // Number of sequences or length
	IDENTIFIER       // Identifier of sequence or part of sequence
	ENDOFLINE        // End of line token
	EOF              // End of File
	WS               // Whitespace
	NUMERIC          // Number of taxa and length of sequences
)

Jump to

Keyboard shortcuts

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