tree

package
v0.0.0-...-616f46f Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2016 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	Index  int
	ID     string
	Anc    *Node
	Sister *Node
	First  *Node
	Len    float64
	Term   string
}

A Node is a node of a phylogenetic tree.

type Tree

type Tree struct {
	ID    string
	Root  *Node
	Nodes []*Node
}

A Tree is a phylogenetic tree.

func Read

func Read(in io.Reader) ([]*Tree, error)

Read reads one or more trees in tsv format from an input stream.

func ReadParenthetic

func ReadParenthetic(in io.Reader, id string) (*Tree, error)

ReadParenthetic reads a single tree in parenthetical format.

func (*Tree) Write

func (t *Tree) Write(out io.Writer, header bool) error

Write writes a tree as csv into an output stream. If header is false, it will not print the column names (the header).

Jump to

Keyboard shortcuts

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