phylotree

package
v0.0.0-...-208a95a Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2016 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package phylotree implements a phylogenetic tree with TMRCA estimates.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clade

type Clade struct {
	// Text is the text line used in the text representation of the tree.
	Text  string
	TMRCA float64
	// SNP is the name of the first SNP that characterizes this clade.
	SNP       string
	Subclades []Clade
	Samples   []Sample
}

Clade represents a phylogenetic clade.

func NewFromFile

func NewFromFile(filename string) (*Clade, error)

NewFromFile parses a text file to create a tree. The return value Clade is the root node of the tree.

func (*Clade) AddSample

func (c *Clade) AddSample(sample Sample)

func (*Clade) AddSubclade

func (c *Clade) AddSubclade(clade Clade)

func (*Clade) String

func (c *Clade) String() string

func (*Clade) Subclade

func (c *Clade) Subclade(cladeName string) *Clade

Subclade returns the subclade that contains searchTerm.

func (*Clade) TMRCAs

func (c *Clade) TMRCAs() []float64

TMRCAs returns the TMRCAs for all new lineages.

type Sample

type Sample struct {
	// Text is the text line used in the text representation of the tree.
	Text string
	ID   string
}

Sample is line of text that represents a genetic sample from a single person.

func (*Sample) String

func (s *Sample) String() string

Jump to

Keyboard shortcuts

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