[Bioperl-l] newick to nexus
Lewis Lukens
llukens at uoguelph.ca
Thu Nov 27 11:39:51 EST 2003
Hi,
I am trying to convert tree files from newick to nexus format. It
seems that one can do this (using the example script from
bio::factory::treefactoryI) but I have been unable to.
My the code is:
#!/usr/bin/perl
use Bio::TreeIO;
my $treeio= new Bio::TreeIO ('-format'=> 'newick', '-file'=>'bpoistree');
my $treeout= new Bio::TreeIO ('-format'=> 'nexus', '-file'=>'>outfile');
while(my $tree = $treeio->next_tree) {
$treeout->write_tree($treeout);
}
The newick tree is fine, but the "nexus" module is missing, and I get
the following error:
Bio::TreeIO: nexus cannot be found
Exception
------------- EXCEPTION -------------
MSG: Failed to load module Bio::TreeIO::nexus. Can't locate
Bio/TreeIO/nexus.pm in @INC (@INC contains:
/System/Library/Perl/darwin /System/Library/Perl /Library/Perl/darwin
/Library/Perl /Library/Perl /Network/Library/Perl/darwin
/Network/Library/Perl /Network/Library/Perl .) at
/Library/Perl/Bio/Root/Root.pm line 407.
STACK Bio::Root::Root::_load_module /Library/Perl/Bio/Root/Root.pm:409
STACK (eval) /Library/Perl/Bio/TreeIO.pm:221
STACK Bio::TreeIO::_load_format_module /Library/Perl/Bio/TreeIO.pm:220
STACK Bio::TreeIO::new /Library/Perl/Bio/TreeIO.pm:121
STACK toplevel treeswitch.pl:4
Is there another way to do this in bioperl?
Thanks much,
Lewis
P.S. Please respond to the address above, as I am not a subscriber to
the mailing list.
--
Lewis Lukens
Assistant Professor
Department of Plant Agriculture
Univ. of Guelph, Guelph, Ontario. N1G 2W1
Tel: (519) 824- 4120 ext 52304
More information about the Bioperl-l
mailing list