[Bioperl-l] Probles with clustalw

Luba Pardo lubapardo at gmail.com
Mon Mar 5 07:34:37 EST 2007


Hello,
 I am learning how to use the module of
Bio::Tools::Run::Alignment::Clustalw. I started to run the example provided
at the module documentation, but it does not work with my input file. the
script is


use warnings;
BEGIN { $ENV{CLUSTALDIR} = '/home/luba/bin/clustalx1.82.linux/';}

use Bio::Tools::Run::Alignment::Clustalw;
#use Bio::Root::Root::Run::WrapperBase;

 #  Build a clustalw alignment factory
  my @params = ('ktuple' => 2, 'matrix' => 'BLOSUM');
 my $factory = Bio::Tools::Run::Alignment::Clustalw->new(@params);

  #  Pass the factory a list of sequences to be aligned.
  my $inputfilename = 'cysprot.fa';
  my $aln = $factory->align($inputfilename); # $aln is a SimpleAlign object.
  # or
  my $seq_array_ref = \@seq_array;
  # where @seq_array is an array of Bio::Seq objects
  my $aln = $factory->align($seq_array_ref);

  # Or one can pass the factory a pair of (sub)alignments
  #to be aligned against each other, e.g.:
  my $aln = $factory->profile_align($aln1,$aln2);
  # where $aln1 and $aln2 are Bio::SimpleAlign objects.

  # Or one can pass the factory an alignment and one or more unaligned
  # sequences to be added to the alignment. For example:
 my  $aln = $factory->profile_align($aln1,$seq); # $seq is a Bio::Seq
object.

  # Get a tree of the sequences
  my $tree = $factory->tree(\@seq_array);

  # Get both an alignment and a tree
  my ($aln, $tree) = $factory->run(\@seq_array);

  # Do a footprinting analysis on the supplied sequences, getting back the
  # most conserved sub-alignments
  my @results = $factory->footprint(\@seq_array);
  foreach my $result (@results) {
  print $result->consensus_string, "\n";
  }

------------- EXCEPTION: Bio::Root::Exception -------------
MSG: Bad input data (sequences need an id ) or less than 2 sequences in
ARRAY(0x8861280) !
STACK: Error::throw
STACK: Bio::Root::Root::throw
/usr/lib/perl5/site_perl/5.8.1/Bio/Root/Root.pm:359
STACK: Bio::Tools::Run::Alignment::Clustalw::align
/usr/lib/perl5/site_perl/5.8.1/Bio/Tools/Run/Alignment/Clustalw.pm:484
STACK: clustal1.pl:17
-----------------------------------------------------------
The input file is OK as I run the program clustalw with my input file of
fasta sequences and it worked. Also if I leave the sentence # $aln =
$factory->align($seq_array_ref); as a comment I get another error:

EXCEPTION: Bio::Root::NotImplemented -------------
MSG: Abstract method "Bio::Tools::Run::WrapperBase::run" is not implemented
by package Bio::Tools::Run::Alignment::Clustalw.
This is not your fault - author of Bio::Tools::Run::Alignment::Clustalw
should be blamed!

STACK: Error::throw
STACK: Bio::Root::Root::throw
/usr/lib/perl5/site_perl/5.8.1/Bio/Root/Root.pm:359
STACK: Bio::Root::RootI::throw_not_implemented
/usr/lib/perl5/site_perl/5.8.1/Bio/Root/RootI.pm:522
STACK: Bio::Tools::Run::WrapperBase::run
/usr/lib/perl5/site_perl/5.8.1/Bio/Tools/Run/WrapperBase.pm:95
STACK: clustal1.pl:32
----------------------------------------------------------------
I know I must ber doing a very simple erro, but I can not run the example.
Can anybody give an advice/

Thanks in advance,

L. Pardo


More information about the Bioperl-l mailing list