bioperl / bioperl-live-redmine

Legacy tickets migrated from the OBF Redmine issue tracker: http://redmine.open-bio.org
0 stars 0 forks source link

Bio::Tools::Run::Phylo::Phyml, tree_string #116

Open cjfields opened 8 years ago

cjfields commented 8 years ago

Author Name: Tristan Lefebure (Tristan Lefebure) Original Redmine Issue: 3273, https://redmine.open-bio.org/issues/3273 Original Date: 2011-07-27 Original Assignee: Bioperl Guts


Hi there, I am not quite sure I understand why tree_string() from Bio::Tools::Run::Phylo::Phyml returns a string that looks like that (I removed the end of the tree):

BIONJ(((((((('92':0.0114354726,'12':0.0472591023)0.0000000000:0.0000005859,...

Why do we have this ‘BIONJ’ thing?

A quick look at the code in the _run() function gives :

       {
       open(my $FH_TREE, "<", $tree_file)
           || $self->throw("Phyml call ($command) did not give an output: $?");
       local $/;
       $self->{_tree} .= <$FH_TREE>;
   }

Why appending something to $self->{_tree}? What about just assigning the tree?

$self-\>{\_tree} = \<$FH\_TREE\>; 

I was about to fill a bug report, but then I saw that in Phyml.t:

   is substr($factory->tree_string, 0, 9), 'BIONJ(SIN', 'tree_string()';

Well, I am lost. Any help much appreciated…