phyloxml

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2018 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WritePhyloXML

func WritePhyloXML(tchan <-chan tree.Trees) (string, error)

Types

type Clade

type Clade struct {
	XMLName      xml.Name `xml:"clade"`
	Clades       []Clade  `xml:"clade"`
	BranchLength float64  `xml:"branch_length"`
	Confidence   float64  `xml:"confidence"`
	Name         string   `xml:"name"`
	Tax          Taxonomy `xml:"taxonomy"`
}

type Parser

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

Parser represents a parser.

func NewParser

func NewParser(r io.Reader) *Parser

NewParser returns a new instance of Parser.

func (*Parser) Parse

func (p *Parser) Parse() (px *PhyloXML, err error)

type PhyloXML

type PhyloXML struct {
	XMLName     xml.Name    `xml:"phyloxml"`
	Phylogenies []Phylogeny `xml:"phylogeny"`
}

Structs for representation of the PhyloXML tree

func (*PhyloXML) FirstTree

func (p *PhyloXML) FirstTree() (t *tree.Tree, err error)

func (*PhyloXML) IterateTrees

func (p *PhyloXML) IterateTrees(it func(*tree.Tree, error))

type Phylogeny

type Phylogeny struct {
	XMLName xml.Name `xml:"phylogeny"`
	Rooted  bool     `xml:"rooted,attr"`
	Root    Clade    `xml:"clade"`
}

type Taxonomy

type Taxonomy struct {
	XMLName        xml.Name   `xml:"taxonomy"`
	TaxId          TaxonomyId `xml:"id"`
	ScientificName string     `xml:"scientific_name"`
	Code           string     `xml:"code"`
}

type TaxonomyId

type TaxonomyId struct {
	Id       int
	Provider string `xml:"provider,attr"`
}

Jump to

Keyboard shortcuts

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