[Bioperl-l] Question about a phylogenetic tree

Brian Osborne bosborne11 at verizon.net
Tue Sep 20 13:01:21 EDT 2011


I have code that starts with a sequence file and makes a tree (Bio::Tree::Tree) using Muscle to align and then Phyml, here's the last part that makes the tree:

..... get the files etc ....

my %alignparams = (
    -seqtype  => 'nucleo',
    -usetree_nowarn => $guidetreefile,
    -in => $tempfile
my $aligner = Bio::Tools::Run::Alignment::Muscle->new(%alignparams);

# $align is a Bio::SimpleAlign object
my $align = $aligner->align($tempfile);

my %treeparams = (
   -data_type => 'nt',
   -model     => 'K80',  # Kimura
   -tree      => 'BIONJ',
   -bootstrap => 1000
my $treemaker = Bio::Tools::Run::Phylo::Phyml->new(%treeparams);

#$tree is a Bio::Tree::Tree object
my $tree = $treemaker->run($align);

My question: do I get the pairwise distance between 2 sequences (based on Kimura here) by doing something like:

$distance = $tree->subtree_length($internal_node)

Where $internal_node is the parent of the pair in question? Excuse me if this is obvious, have never made Bioperl trees before!

Brian O.

More information about the Bioperl-l mailing list