Macaulay2 » Documentation
Packages » PhylogeneticTrees :: LeafTree
next | previous | forward | backward | up | index | toc

LeafTree -- a tree described in terms of its leaves

Description

A tree can be described in terms of its leaves by specifying a leaf set and specifying the edges as partitions of the leaf set. This leaf centric description is particularly useful for phylogenetic trees.

The main constructor method is leafTree.

i1 : T = leafTree({a,b,c,d},{{a,b}})

o1 = {{a, b, c, d}, {set {a, b}, set {a}, set {b}, set {c}, set {d}}}

o1 : LeafTree
i2 : leaves T

o2 = set {c, d, a, b}

o2 : Set
i3 : edges T

o3 = {set {a, b}, set {a}, set {b}, set {c}, set {d}}

o3 : List
i4 : G = graph{{a,e},{b,e},{e,f},{c,f},{d,f}}

o4 = Graph{a => {e}      }
           b => {e}
           c => {f}
           d => {f}
           e => {a, b, f}
           f => {e, c, d}

o4 : Graph
i5 : leafTree G

o5 = {{a, b, c, d}, {set {a, b}, set {a}, set {b}, set {c}, set {d}}}

o5 : LeafTree

See also

Methods that use an object of class LeafTree:

  • digraph(LeafTree,List) -- convert a LeafTree to a Digraph
  • digraph(LeafTree,Set) -- see digraph(LeafTree,List) -- convert a LeafTree to a Digraph
  • edgeContract(LeafTree,List) -- see edgeContract -- contract an edge of a tree
  • edgeContract(LeafTree,Set) -- see edgeContract -- contract an edge of a tree
  • edgeCut(LeafTree,List,Thing) -- see edgeCut -- break up a tree at an edge
  • edgeCut(LeafTree,Set,Thing) -- see edgeCut -- break up a tree at an edge
  • edges(LeafTree) -- list the edges of a tree
  • graph(LeafTree) -- convert a LeafTree to Graph
  • internalEdges(LeafTree) -- see internalEdges -- list the internal edges of a tree
  • internalVertices(LeafTree) -- see internalVertices -- list the internal vertices of a tree
  • isIsomorphic(LeafTree,LeafTree) -- check isomorphism of two tree
  • leafColorings(LeafTree,Model) -- see leafColorings -- list the consistent colorings of a tree
  • LeafTree == LeafTree
  • leaves(LeafTree) -- list the leaves of a tree
  • phyloToric42(LeafTree,Model) -- see phyloToric42 -- compute the invariants of a group-based phylogenetic model with 4ti2
  • phyloToricAMatrix(LeafTree,Model) -- see phyloToricAMatrix -- construct the design matrix of a group-based phylogenetic model
  • phyloToricFP(LeafTree,Model) -- see phyloToricFP -- compute the invariants of a group-based phylogenetic model with toric fiber products
  • phyloToricLinears(LeafTree,Model) -- see phyloToricLinears -- compute the linear invariants of a group-based phylogenetic model
  • phyloToricQuads(LeafTree,Model) -- see phyloToricQuads -- compute the quadratic invariants of a group-based phylogenetic model
  • phyloToricRandom(LeafTree,Model) -- see phyloToricRandom -- compute a random invariant of a group-based phylogenetic model
  • pRing(LeafTree,Model) -- see pRing -- construct the ring of probability coordinates
  • qRing(LeafTree,Model) -- see qRing -- construct the ring of Fourier coordinates
  • vertexCut(LeafTree,List,Thing,Thing) -- see vertexCut -- break up a tree at a vertex
  • vertexCut(LeafTree,Set,Thing,Thing) -- see vertexCut -- break up a tree at a vertex
  • vertices(LeafTree) -- list the vertices of a tree

For the programmer

The object LeafTree is a type, with ancestor classes List < VisibleList < BasicList < Thing.


The source of this document is in PhylogeneticTrees.m2:1714:0.