[Bioperl-l] neighbor.pm

Elizabeth Williams ew9 at york.ac.uk
Tue Feb 24 05:30:02 EST 2004

I have a problem running the bit of code below.  I get this message:

"Can't call method "names" on an undefined value at 
line 470."

but not all the time - it mostly works but on some alignments it comes up 
with this error.
Any ideas of what the problem is or how to fix it?

                         #align sequences
                         my @params_align = ('ktuple' => 2, 'matrix' => 
'BLOSUM', 'QUIET' => 1);
                         my $factory = 
                         my $seq_array_ref = \@seq_array; # where 
@seq_array is an array of Bio::Seq objects
                         my $aln = $factory->align($seq_array_ref);
                         my @params_protdist = ('MODEL' => 'PAM', 'QUIET' 
=> 1);

                         my $protdist_factory = 


                         my $matrix = $protdist_factory->run($aln);

                         my @params_neighbor = ('type'=>'NJ', 'QUIET' => 1);

                         my $neighborfactory = 


                         my (@trees) = $neighborfactory->run($matrix);

                         my $outtree = new Bio::TreeIO(-file => 

                         foreach my $tree (@trees) {



Elizabeth J.B. Williams
Department of Biology
University of York
YO10 5YW
mobile: 07813149274
work: 01904 328757
Fax: 01904 328762

More information about the Bioperl-l mailing list