[Bioperl-l] Bugz in Consense
Devin Scannell
scannedr at tcd.ie
Thu Sep 16 06:53:04 EDT 2004
Hi,
was having some trouble setting the outgroup when drawing trees with
phylip and tracked the problem down to here (changes marked with ###) :
Consense.pm
sub _set_names_from_tree {
my ($self,$tree) = @_;
my $newick;
my $ios = IO::String->new($newick);
my $tio = Bio::TreeIO->new(-fh=>$ios,-format=>'newick');
$tio->write_tree($tree);
### changed \w to [\w\._]
### newick allows at least these and I think a few other symbols
my @names = $newick=~/([\w\._]+):\d+/g;
my %names;
### changed < to <=
for(my $i=0; $i <= $#names; $i++){
$names{$names[$i]} = $i+1;
}
$self->names(\%names);
return;
}
apologies if there is a better way of submitting fixes than mailing the
the whole list... but better to err on the side of caution, right?
regards,
Devin
More information about the Bioperl-l
mailing list