nextstrain

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NSBranchAttributes

type NSBranchAttributes struct {
	Labels struct {
		Aa string `json:"aa"`
	} `json:"labels"`
	Mutations map[string][]string `json:"mutations"`
}

type Nextstrain

type Nextstrain struct {
	Tree    NsNode `json:"tree"`
	Version string `json:"version"`
}

Structs for representation of the PhyloXML tree

func (*Nextstrain) FirstTree

func (n *Nextstrain) FirstTree() (t *tree.Tree, err error)

func (*Nextstrain) IterateTrees

func (n *Nextstrain) IterateTrees(it func(*tree.Tree, error))

type NsDate

type NsDate struct {
	Value      float64   `json:"value"`
	Confidence []float64 `json:"confidence"`
}

type NsNode

type NsNode struct {
	BranchAttr NSBranchAttributes `json:"branch_attrs"`
	Children   []NsNode           `json:"children"`
	Name       string             `json:"name"`
	Attributes NsNodeAttributes   `json:"node_attrs"`
}

type NsNodeAttributes

type NsNodeAttributes struct {
	Divergence          float64 `json:"div"`
	LocalBranchingIndex struct {
		Value float64 `json:"value"`
	} `json:"lbi"`
	Date      NsDate   `json:"num_date"`
	Region    NsRegion `json:"region"`
	Accession string   `json:"accession"`
	Age       struct {
		Value string `json:"value"`
	} `json:"age"`
	CladeMembership struct {
		Value string `json:"value"`
	} `json:"clade_membership"`
	Country struct {
		Value string `json:"value"`
	} `json:"country"`
	Division struct {
		Value string `json:"value"`
	} `json:"division"`
	Epiweek struct {
		Value string `json:"value"`
	} `json:"epiweek"`
	Gender struct {
		Value string `json:"value"`
	} `json:"gender"`
	OriginatingLab struct {
		Value string `json:"value"`
	} `json:"originating_lab"`
	Recency struct {
		Value string `json:"value"`
	} `json:"recency"`
	SubmittingLab struct {
		Value string `json:"value"`
	} `json:"submitting_lab"`
}

type NsRegion

type NsRegion struct {
	Value      string             `json:"value"`
	Entropy    float64            `json:"entropy"`
	Confidence map[string]float64 `json:"confidence"`
}

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() (ns *Nextstrain, err error)

Jump to

Keyboard shortcuts

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