[Bioperl-l] clustalw
Luba Pardo
lubapardo at gmail.com
Tue Mar 6 10:56:52 UTC 2007
Hello,
I tried to post this question yesterday (sorry if you get the email several
times).
I am trying to run a script for Clustalw based on few examples. I always get
an error:
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
or
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!
No matter if I used a scalar inputfile or a SeqIO object. I also run the
clustalw.pl script, but I can not run the example number 3.
Is there anything going with the clustalw module? Because clustalw runs OK
with my files if I use it without Bioperl.
THIS IS THE SCRIPT
BEGIN {$ENV{CLUSTALDIR} = '/home/luba/bin/clustalx1.82.linux/';}
use Bio::SeqIO;
use Bio::Tools::Run::Alignment::Clustalw;
use Bio::SimpleAlign;
use Bio::AlignIO;
#use strict;
use warnings;
my @params = ('ktuple' => 2, 'matrix' => 'BLOSUM');
my $factory = Bio::Tools::Run::Alignment::Clustalw->new(@params);
my $str = Bio::SeqIO->new(-file=> 'clustalw.fa ', '-format' => 'Fasta');
my @seq_array =();
while ( my $seq = $str->next_seq() ) {push (@seq_array, $seq) ;}
my $seq_array_ref = \@seq_array;
my $aln = $factory->align($seq_array_ref);
# Get a tree of the sequences
$tree = $factory->tree(\@seq_array);
# Get both an alignment and a tree
($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";
}
Thanks in advance,
L. Pardo
More information about the Bioperl-l
mailing list