[Bioperl-l] Error in constructing Phylogenetic tree using BioPerl

Sendu Bala bix at sendu.me.uk
Tue Jun 26 14:13:48 UTC 2007


SujiBala wrote:
> Hi Hello
>   This is sujatha from singapore. I am trying to construct phylo tree using DNAStatistics and Kirma method. But I am getting the following error message. It would be nice if you could help me resolve this problem asap. 
>    
>   Error messasge
>     Must supply  a valid Bio::Align::AlignI for the _align parameter  in the distance 
>   My program
>   use Bio::AlignIO;
> use Bio::Align::DNAStatistics;
> use Bio::Tree::DistanceFactory;
> # for a dna alignment  can also use ProteinStatistics
> @aln = Bio::AlignIO->new(-file => 'out4.fa', -format=>'clustalw');
> $stats = Bio::Align::DNAStatistics->new;
> $mat = $stats->distance( -align  => @aln,-method => 'Kimura');

Without looking at the docs for these modules, it is immediately obvious 
that Bio::AlignIO->new() is going to return an instance of Bio::AlignIO 
and not an array of alignments. It is also obvious that the -align => 
parameter for the distance() method can't take an array of anything (but 
probably an array ref?).

Check the documentation and make sure you know what objects you're 
generating and passing around.



More information about the Bioperl-l mailing list