[Bioperl-l] Question about a phylogenetic tree

Brian Osborne bosborne11 at verizon.net
Tue Sep 20 19:17:13 UTC 2011


Ah, I see:

my $distances = $tree->distance(-nodes => [$node1,$node2]);

Brian O.


On Sep 20, 2011, at 1:01 PM, Brian Osborne wrote:

> All,
> 
> 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.
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l





More information about the Bioperl-l mailing list