[Bioperl-l] neighbor.pm

Jason Stajich jason at cgt.duhs.duke.edu
Tue Feb 24 08:10:34 EST 2004


can you track it down to a specific dataset which causes the problem?  I
would first guess that neighbor is failing and we're not detecting that
very well.  you're getting an empty matrix so that is why names is
failing.

-jason

On Tue, 24 Feb 2004, Elizabeth Williams wrote:

> Hello,
> I have a problem running the bit of code below.  I get this message:
>
> "Can't call method "names" on an undefined value at
> /biol/programs/perl580/lib/site_perl/5.8.0/Bio/Tools/Run/Phylo/Phylip/Neighbor.pm
> 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 =
> Bio::Tools::Run::Alignment::Clustalw->new(@params_align);
>                          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 =
> Bio::Tools::Run::Phylo::Phylip::ProtDist->new(@params_protdist);
>
>                          $protdist_factory->version('3.6');
>
>                          my $matrix = $protdist_factory->run($aln);
>
>                          my @params_neighbor = ('type'=>'NJ', 'QUIET' => 1);
>
>                          my $neighborfactory =
> Bio::Tools::Run::Phylo::Phylip::Neighbor->new(@params_neighbor);
>
>                          $neighborfactory->version('3.6');
>
>                          my (@trees) = $neighborfactory->run($matrix);
>
>                          my $outtree = new Bio::TreeIO(-file =>
> ">>geneorigin_results2.xls");
>
>                          foreach my $tree (@trees) {
>
>                                  $outtree->write_tree($tree);
>
>                          }
>
> Elizabeth J.B. Williams
> CNAP
> Department of Biology
> University of York
> York
> YO10 5YW
> mobile: 07813149274
> work: 01904 328757
> Fax: 01904 328762
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>

--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu


More information about the Bioperl-l mailing list