MetaPhylo

Documentation for MetaPhylo.

AbstractTrees.treeheightMethod
AbstractTrees.treeheight(tree::AbstractPhyloTree)

Return the maximum depth from the root to the leaves in the tree. See also treelength.

source
MetaPhylo.add_child!Method
add_child!(tree::Tree, idx::Integer, branch_data::Dict{Symbol, Any}, node_data::Dict{Symbol, Any})

Add a child node to the specified node with branch and node data. Return true on success.

source
MetaPhylo.ancestorsMethod
ancestors(tree::AbstractPhyloTree, idx::Integer)

Return the indices of all ancestor nodes of the specified idx node.

source
MetaPhylo.common_ancestorMethod
common_ancestor(tree::AbstractPhyloTree, idx::Integer...)

Return the lowest common ancestor index among specified nodes.

source
MetaPhylo.distanceMethod
distance(tree::AbstractPhyloTree, idx1::Integer, idx2::Integer)

Return distance between two nodes on a tree.

source
MetaPhylo.distance_matrixMethod
distance_matrix(tree::AbstractPhyloTree, [indices::Vector{<:Integer}])

Return pairwise distances between all indices on the tree as an AxisArray. If not indices are specified, all leaves are used as input.

source
MetaPhylo.findbranchesMethod
findbranches(tree::AbstractPhyloTree, args...; ifnot_haskey::Bool=false)

Return indices of tree branch which all values proceed by transformation(s) args for a given attribute are true.

source
MetaPhylo.findnodesMethod
findnodes(tree::AbstractPhyloTree, args...; ifnot_haskey::Bool=false)

Return indices of tree node which all values proceed by transformation(s) args for a given attribute are true.

source
MetaPhylo.freezeMethod
freeze(tree::MetaPhylo.Tree)

Generate a StaticTree from a tree. NamedTuple stores only the keys that are common to all data among the node and branch data of previous tree.

source
MetaPhylo.isinternalMethod
isinternal(tree::AbstractPhyloTree, idx::Integer)

Return true if the edge is both connected to internal nodes of the tree.

source
MetaPhylo.isinternalMethod
isinternal(tree::AbstractPhyloTree, idx::Integer)

Return true if the idx is contained in an internal node of the tree.

source
MetaPhylo.isleafMethod
isleaf(tree::AbstractPhyloTree, edge::Edge)

Return true if the edge is connected to a leaf node of the tree.

source
MetaPhylo.isleafMethod
isleaf(tree::AbstractPhyloTree, idx::Integer)

Return true if the idx is contained in a leaf node of the tree.

source
MetaPhylo.ladderize!Method
ladderize!(tree::Tree; left=false)

Ladderize the tree structure. By default, the smallest clade is on the right side; if left=true, on the left side.

source
MetaPhylo.leafedgesMethod
leafedges(tree::AbstractPhyloTree, [idx::Integer])

Return the edges of all edges connected to the leaves in the tree. If the index is specified, this returns the edges connected to its leaves in the tree.

source
MetaPhylo.leavesMethod
leaves(tree::AbstractPhyloTree, [idx::Integer])

Return the indices of all leaves in the tree. If the index is specified, this returns the indices of leaves in its subtree.

source
MetaPhylo.parent_branchMethod
parent_branch(tree::AbstractPhyloTree, idx::Integer)

Return the baranch (edge) between the specified idx node and its parent node. If the node is root, this returns nothing

source
MetaPhylo.reroot!Method
reroot!(tree::Tree, idx::Integer)

Reroot the tree at the specified node. Return true if rerooting success.

source
MetaPhylo.swap!Method
swap!(tree::Tree, idx::Integer, old_new::Pair{<:Integer, <:Integer})

Swap the two child elements of the specified idx node. The old and new in old_new must be child of idx node. Return ture if swapping fails; true otherwise.

source
MetaPhylo.swapchildren!Method
swapchildren!(tree::Tree, idx::Integer, newchildren)

Swap the child indices of the specified idx node to the given newchildren. The elements of children and newchildren must be match. Return false if swapping fails; true otherwise.

source
MetaPhylo.treelengthMethod
treelength(tree::AbstractPhyloTree, [idx::Integer])

Return maximum distance from the root to the leaves in the tree. If the index is specified, this returns maximum distance from the specified idx to its leaves in the tree.

source