Exploring the Phylogenetic Tree

After you create a phylogenetic tree, you can explore the tree using the MATLAB command line or the phytreetool GUI. This procedure uses the tree created in Creating a Phylogenetic Tree for Twelve Species as an example.

  1. List the members of a tree.

    names = get(tree,'LeafNames')

    From the list, you can determine the indices for its members. For example, the European Human leaf is the third entry.

    names = 
    
        'German_Neanderthal'
        'Russian_Neanderthal'
        'European_Human'
        'Chimp_Troglodytes'
        'Chimp_Schweinfurthii'
        'Chimp_Verus'
        'Chimp_Vellerosus'
        'Puti_Orangutan'
        'Jari_Orangutan'
        'Mountain_Gorilla_Rwanda'
        'Eastern_Lowland_Gorilla'
        'Western_Lowland_Gorilla'
  2. Find the closest species to a selected specie in a tree. For example, find the species closest to the European human.

    [h_all,h_leaves] = select(tree,'reference',3,
                              'criteria','distance',
                              'threshold',0.6);
    

    h_all is a list of indices for the nodes within a patristic distance of 0.6 to the European human leaf, while h_leaves is a list of indices for only the leaf nodes within the same patristic distance.

    A patristic distance is the path length between species calculated from the hierarchical clustering distances. The path distance is not necessarily the biological distance.

  3. List the names of the closest species.

    subtree_names = names(h_leaves)
    

    MATLAB prints a list of species with a patristic distance to the European human less than the specified distance. In this case, the patristic distance threshold is less than 0.6.

       subtree_names = 
    
        'German_Neanderthal'
        'Russian_Neanderthal'
        'European_Human'
        'Chimp_Schweinfurthii'
        'Chimp_Verus'
        'Chimp_Troglodytes'
    
  4. Extract a subtree from the whole tree by removing unwanted leaves. For example, prune the tree to species within 0.6 of the European human specie.

    leaves_to_prune = ~h_leaves;
    pruned_tree = prune(tree,leaves_to_prune)
    h = plot(pruned_tree,'orient','bottom');
    ylabel('Evolutionary distance')
    set(h.terminalNodeLabels,'Rotation',-30)    

    MATLAB returns information about the new subtree and plots the pruned phylogenetic tree in a figure window.

    Phylogenetic tree object with 6 leaves (5 branches)

  5. Explore, edit, and format a phylogenetic tree using an interactive GUI.

    phytreetool(pruned_tree)
    

    MATLAB opens the Phylogenetic Tree Tool window and draws the tree.

    You can interactively change the appearance of the tree within the tool window. For information on using this GUI, see Phylogenetic Tree Tool Reference.


© 1994-2005 The MathWorks, Inc.