Documentation ¶
Index ¶
- Variables
- func BinaryCost(gt *Tree, st *SpeciesTree) (dup, loss, dc int, err error)
- func RF(gt *Tree, st *SpeciesTree) (rf int, err error)
- func RefineGt(gt *Tree, st *SpeciesTree, method string, weights ...float64) error
- type InvalidEdgeLengthError
- type InvalidMethodError
- type InvalidTreeError
- type Lcamap
- type NoTaxaError
- type Node
- type SpeciesTree
- type Taxonmap
- type Tree
- func (t *Tree) AssignLeafName()
- func (t *Tree) ContractByLength(length float64)
- func (t *Tree) ContractSingleChild()
- func (t *Tree) IsBinary() bool
- func (t *Tree) LCAer() func(a, b *Node) *Node
- func (t *Tree) PruneFromTaxon(taxon Taxonmap)
- func (t *Tree) PruneFromTree(gt *Tree)
- func (t *Tree) RandomContract(rate float64)
- func (t *Tree) SpeciesTree() (*SpeciesTree, error)
- func (t *Tree) TaxonMap() (taxon Taxonmap, unique bool)
- func (t *Tree) Update()
- func (t *Tree) UpdateInfo()
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NotEnoughWeightsError = errors.New("Not enough weight parameters.") NotBinarySpeciesTreeError = errors.New("Species tree is not binary.") )
View Source
var (
SpeciesTreeNotUniquelyLabeledError = errors.New("Species tree is not uniquely labeled.")
)
Functions ¶
func BinaryCost ¶
func BinaryCost(gt *Tree, st *SpeciesTree) (dup, loss, dc int, err error)
BinaryCost finds the duplication, loss, and deep coalescence cost for input binary gene tree and species tree.
Types ¶
type InvalidEdgeLengthError ¶
type InvalidEdgeLengthError struct {
EdgeLength string
}
func (InvalidEdgeLengthError) Error ¶
func (err InvalidEdgeLengthError) Error() string
type InvalidMethodError ¶
type InvalidMethodError struct {
Method string
}
func (InvalidMethodError) Error ¶
func (err InvalidMethodError) Error() string
type InvalidTreeError ¶
type InvalidTreeError struct {
TreeString string
}
func (InvalidTreeError) Error ¶
func (err InvalidTreeError) Error() string
type Lcamap ¶
type Lcamap struct { G *Tree S *SpeciesTree Map []*Node }
type NoTaxaError ¶
type NoTaxaError struct {
Taxa string
}
func (NoTaxaError) Error ¶
func (err NoTaxaError) Error() string
type Node ¶
func (*Node) IsInternal ¶
type Tree ¶
func ExampleTree ¶
func SimuTreeRandomTaxon ¶
func (*Tree) AssignLeafName ¶
func (t *Tree) AssignLeafName()
func (*Tree) ContractByLength ¶
Contract tree branches whose lengthes are less than the given one.
func (*Tree) ContractSingleChild ¶
func (t *Tree) ContractSingleChild()
Contract tree branches which have only one child.
func (*Tree) IsBinary ¶
A tree is binary tree <=> every internal node has two children. Overwrite `node.IsBinary` method.
func (*Tree) PruneFromTaxon ¶
Prune tree according to the taxonmap
func (*Tree) PruneFromTree ¶
Prune tree according to another tree
func (*Tree) RandomContract ¶
Randomly contract tree branches according to the given rate.
func (*Tree) SpeciesTree ¶
func (t *Tree) SpeciesTree() (*SpeciesTree, error)
func (*Tree) TaxonMap ¶
`TaxonMap` return the `Taxonmap` for a tree, and the uniqueness of its taxon.
Click to show internal directories.
Click to hide internal directories.