[Bioperl-l] help, please. newick.pm error

june tantoolvesm june at ics.es.osaka-u.ac.jp
Thu Jun 10 08:57:07 EDT 2004


Could somebody please help me? I tried searching everywhere, but
couldn't find anything. I am using bioperl to run clustalw, protdist,
and neighbor, but for some reason I get this message: 

Can't call method "get_root_node" on unblessed reference at
/home/pippin/june/mod/Bio/TreeIO/newick.pm line 214.

I have no idea where to get started to try to solve this. I am currently
using phylip 3.5. Here is my code:

use Bio::Tools::Run::Alignment::Clustalw;
use Bio::Tools::Run::Phylo::Phylip::ProtDist;
use Bio::Tools::Run::Phylo::Phylip::Neighbor;

use Bio::AlignIO;
use Bio::SimpleAlign;
use strict;

$ENV{PHYLIPDIR} = '/home/pippin/june/phylip';
$ENV{CLUSTALDIR} = '/home/pippin/june/clustalx';

my @params_align = ();
my $factory = Bio::Tools::Run::Alignment::Clustalw->new(@params_align);
my $inputfilename = 'homologene1.fa';
my $aln = $factory->align($inputfilename); # $aln is a SimpleAlign

# create a distance matrix
my @params_protdist = ('MODEL' => 'PAM');
my $protdist_factory =
my $matrix = $protdist_factory->run($aln);

my @params_neighbor = ('type' => 'NJ');
my $neighbor_factory =
my $tree = $neighbor_factory->run($matrix);
my $outtree = new Bio::TreeIO('-format' => 'newick',
                              '-file'   => '>outtree');


I am not sure if anyone has ever had this problem? Any help much
appreciated, thank you.


More information about the Bioperl-l mailing list