Documentation ¶
Index ¶
- func FBP(reftree *tree.Tree, boottrees <-chan tree.Trees, cpus int, sup *Supporter) error
- func MinTransferDist(refedge *tree.Edge, reftree, boottree *tree.Tree, ntips int, ...) (dist int, minedge *tree.Edge, speciestoadd, speciestoremove []*tree.Node)
- func NormalizeTransferDistancesByDepth(edges []*tree.Edge, nboot int)
- func ReformatAvgDistance(t *tree.Tree, nboot int)
- func TBE(reftree *tree.Tree, boottrees <-chan tree.Trees, cpu int, outrawtree bool, ...) (rawtree *tree.Tree, err error)
- func UpdateTaxaMoveArrays(ref, boot *tree.Edge, dist, p int, moved_species []int, ...)
- type Supporter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FBP ¶ added in v0.4.0
Computes bootstrap supports of reftree branches, given trees in boottrees channel
func MinTransferDist ¶ added in v0.4.0
func MinTransferDist(refedge *tree.Edge, reftree, boottree *tree.Tree, ntips int, bootedges []*tree.Edge, absent bool) (dist int, minedge *tree.Edge, speciestoadd, speciestoremove []*tree.Node)
This function computes the min transfer distance between the refedge and the bootstrap tree. If "absent" is true, then we know that the ref branch is not present in the bootstrap tree (it is faster to compute then), and we stop if dist == 1 Else: we do not know, we do the full postorder traversal, and speciestoadd && speciestoremove are filled
func NormalizeTransferDistancesByDepth ¶ added in v0.2.4
This function takes all branch support values (that are considered as average transfer distances over bootstrap trees), normalizes them by the depth and convert them to similarity, i.e:
1-avg_dist/(depth-1)
func ReformatAvgDistance ¶ added in v0.2.4
This function writes on the child node name the string: "branch_id|avg_dist|depth" and removes support information from each branch
func TBE ¶ added in v0.4.0
func TBE(reftree *tree.Tree, boottrees <-chan tree.Trees, cpu int, outrawtree bool, computeavgtaxa, computeperbranchtaxa bool, distcutoff float64, logfile *os.File, sup *Supporter) (rawtree *tree.Tree, err error)
computes the transfer dist for each edges of the ref tree outrawtree: if tree with average transfer distance (non normalized) must be computed if false: then output rawtree is null
func UpdateTaxaMoveArrays ¶ added in v0.4.0
func UpdateTaxaMoveArrays(ref, boot *tree.Edge, dist, p int, moved_species []int, moved_species_per_branch [][]int, nb_branches_close *int, speciestoadd, speciestoremove []*tree.Node, distcutoff float64, mindepth int, computeavgtaxa, computeperbranchtaxa bool, mux *sync.Mutex)
Looking at number of times each taxon moves around low distance branches moved_species: array of size number of nodes in the tree species_to_add & species_to_remove: Array of species (tree nodes) that move distcutoff: if the bootstrap branch is too distant from the ref branch in terms of normalized transfer dist, then does not count
Types ¶
type Supporter ¶
type Supporter struct {
// contains filtered or unexported fields
}
func NewSupporter ¶ added in v0.4.0
func NewSupporter() *Supporter
Returns the progress of the analysis
func (*Supporter) Cancel ¶ added in v0.1.10
func (sup *Supporter) Cancel()
Tells the supported to stop the analysis It will just finish the current computations
func (*Supporter) IncrementProgress ¶ added in v0.4.0
func (sup *Supporter) IncrementProgress()
Increments the progress of the analysis