[Bioperl-l] Nexus tree format and nexus.pm version 1.8

George Magklaras george.magklaras at biotek.uio.no
Wed Sep 22 11:52:47 EDT 2004


===The Question===
With regards to Bio::TreeIO, are there still issues with writing nexus 
format trees by means of calling write_tree on BioPerl 1.4? Or in the 
case below, what am I doing wrong?

==THE background:==

A small script that tries to convert newick to nexus format goes:
use Bio::TreeIO;

print "newickfile=$NEWICKFILE, nexusfile=$NEXUSFILE\n";

my $treeio = new Bio::TreeIO(-format => 'newick', -file   => "$NEWICKFILE");

my $treeout = new Bio::TreeIO(-format => 'nexus', -file   => ">$NEXUSFILE");

  while(my $tree = $treeio->next_tree) {



exit 0;


Initially, running this script with the nexus.pm module that comes with 
the default BioPerl 1.4 (version 1.2) produces the exception

------------- EXCEPTION  -------------
MSG: Cannot call method write_tree on Bio::TreeIO object must use a subclass

That prompted me to upgrade to version 1.8 of the nexus.pm , according 
to Jason's suggestions to Csaba Ortutay on the 3rd of August 2004. 
Re-running the script with the latest module produces a different exception:

Can't locate object method "get_nodes" via package "Bio::TreeIO::nexus" 
at /usr/lib/perl5/site_perl/5.8.0/Bio/TreeIO/nexus.pm line 212, <GEN0> 
line 1.

My PERL details:

Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
     osname=linux, osvers=2.4.20-8smp, archname=i386-linux
     uname='linux storeslem.uio.no 2.4.20-8smp #1 smp thu mar 13 
17:45:54 est 2003 i686 unknown unknown gnulinux '
-Dperladmin=unix-drift at usit.uio.no -Dcc=cc-wrapper 
-Dlocincpth=/local/include -Dloclibpth=/local/lib -Uinstallusrbinperl 
-Dprefix=/local -Dsiteprefix=/local -Dinstallprefix=/local 
-Darchlib=/local/lib/perl5/5.8.0 -Dprivlib=/local/share/perl5/5.8.0 
-Dman1dir=/local/share/man/man1 -Dman3dir=/local/share/man/man3 -de'
     hint=recommended, useposix=true, d_sigaction=define
     usethreads=undef use5005threads=undef useithreads=undef 
     useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
     use64bitint=undef use64bitall=undef uselongdouble=undef
     usemymalloc=n, bincompat5005=undef
     cc='cc-wrapper', ccflags ='-fno-strict-aliasing -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
     cppflags='-fno-strict-aliasing -I/usr/include/gdbm'
     ccversion='', gccversion='3.2.2 20030222 (Red Hat Linux 3.2.2-5)', 
     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
     ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
     alignbytes=4, prototype=define
   Linker and Libraries:
     ld='cc-wrapper', ldflags =' -L/local/lib'
     libpth=/local/lib /lib /usr/lib /usr/local/lib
     libs=-lnsl -lgdbm -ldb -ldl -lm -lc -lcrypt -lutil
     perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil
     libc=/lib/libc-2.3.2.so, so=so, useshrplib=false, libperl=libperl.a
   Dynamic Linking:
     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
     cccdlflags='-fpic', lddlflags='-shared -L/local/lib'



More information about the Bioperl-l mailing list