Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Lee Katz <lskatz <at> gmail.com>
Subject: TreeIO and bootstrap values
Newsgroups: gmane.comp.lang.perl.bio.general
Date: Monday 23rd December 2013 22:44:33 UTC (over 3 years ago)
Hi, I want to change the bootstrap values in my phylogeny to some
artificial Fst values I created earlier in the script.  This subroutine
seems to be doing the trick because Data::Dumper shows that the nodes and
the tree have the new bootstraps.  However, the resulting Newick tree does
not display them.  Can anyone help?  Thank you.

http://pastie.org/private/wtn0pqgjwrmpdswodok4mw#

sub printTree{
  my($fst,$tree,$settings)=@_;
  my $treeIn=new Bio::TreeIO(-file=>$tree)->next_tree;
  my $out=Bio::TreeIO->new(-format=>"newick");
  for my $node($treeIn->get_nodes){    # get all descendents of the
node and alpha-sort them    my @d=sort{$a->id cmp $b->id}
$node->each_Descendent;    next if([email protected]);    # make a comma-separated
key    my $key; $key.=$_->id."," for(@d);    $key=~s/,$//;    # next
if that key isn't in $fst: not all $fst combos were calculated.
next if(!$$fst{$key});    # apply the Fst with that key
$node->bootstrap($$fst{$key});
  }

  $out->write_tree($treeIn);
}


-- 
Lee Katz, Ph.D.
 
CD: 3ms