[Bioperl-l] newick to nexus

Rob Edwards redwards at utmem.edu
Thu Nov 27 11:56:16 EST 2003


You need to get a more recent version of bioperl. The nexus module was 
not in earlier versions.

As you don't have the file Bio/TreeIO/nexus.pm you need to update 
bioperl.

Rob

On Thursday, November 27, 2003, at 10:39  AM, Lewis Lukens wrote:

> 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
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l



More information about the Bioperl-l mailing list