13 Dec 2012 05:05
Re: Asking
Jason Stajich <jason.stajich <at> gmail.com>
2012-12-13 04:05:29 GMT
2012-12-13 04:05:29 GMT
You want the reroot function. Have you tried reading the howtos on the website already.
Node is a node in the tree. There are several functions to find a node or iterate through all the ones in the tree
Sent from my iPhone-please excuse typos
--
Jason Stajich
On Dec 12, 2012, at 7:30 PM, "Xing-Xing Shen" <shenxingxing2010 <at> gmail.com> wrote:
> Drear Jason
> I am a green hand in learning Bioperl. Now, I met a problem about how to define outgroup for a set of newick trees.
>
> My codes below:
> #!/usr/bin/perl
> use Bio::TreeIO;
> use Bio::Tree::NodeI;
> use Bio::Tree::Tree;
> my <at> filenames = glob("*.txt");
> foreach my $filename ( <at> filenames) {
> my $treeio = Bio::TreeIO->new('-format' => 'newick', '-file' => "$filename");
> while( my $tree = $treeio->next_tree ) {
> $tree->set_root_node("$node"); # what might $node mean?
> ..........
> ..........
> }
> }
>
>
> With best,
>
> Xing-Xing Shen
RSS Feed