[Bioperl-l] Help for using Clustalw.pm

James Wasmuth james.wasmuth at ed.ac.uk
Tue Jul 27 08:28:57 EDT 2004


Jane,

Try:

$clustalfound = *Bio::Tools::Run::Alignment::Clustalw*->exists_clustal()

print "$clustalfound";

if '0' then it can't find an executable of clustalw. Does it work from 
the commandline ?

-james


Sun, Jian wrote:

>Dear all:
>     I tried to align multiple sequence through Clustalw.pm, and I used the source code attached below:
>*****************************************************************************************************
>#!C:\Perl\bin\perl.exe
>use lib "C:\Perl\lib";
> 
>use Bio::Perl;
>use Bio::Tools::Run::Alignment::Clustalw;
>use strict;
>use warnings;
> 
>$ENV{CLUSTALDIR} = 'C:/Program Files/Apache Group/Apache2/bin/';
>my @params = ('ktuple' => 2, 'matrix' => 'BLOSUM');
>  my $factory = Bio::Tools::Run::Alignment::Clustalw->new(@params);
>  my $ktuple = 3;
>  $factory->ktuple($ktuple);  # change the parameter before executing
>  my $str = Bio::SeqIO->new(-file=> 'Clustseq.fa', '-format' => 'Fasta');
> my @seq_array =();
> while ( my $seq = $str->next_seq() ) {push (@seq_array, $seq) ;}
>  my $seq_array_ref = \@seq_array;
>      # where @seq_array is an array of Bio::Seq objects
>  my $aln = $factory->align($seq_array_ref);
>**************************************************************************
> 
>and when I run the pl file, I get this error message:
> 
>///////////////////////////////////////////////////////////////////////////////////////////
>Clustalw program not found as clustalw or not executable.
>......  
>'clustalw' is not recognized as an internal or external command, 
>operable program or batch file.
>---------------------EXCEPTION-----------------------------------------
>MSG: Clustalw call <clustal align -infile=C:\...\> crashed:256
> 
>STACK Bio::Tools::Run::Alignment::Clustalw::_run c:/Perl/Site/Lib/Bio/Toold/Run/Alignment/Clustalw.pm:581
>STACK Bio::Tools::Run::Alignment::Clustalw::_run c:/Perl/Site/Lib/Bio/Toold/Run/Alignment/Clustalw.pm:507
>STACK toplevel test726pl.pl:33
>-----------------------------------------------------------------------------------------
>///////////////////////////////////////////////////////////////////////////////////////
> 
>Since I already set the CLUSTALDIR variable, I don't know why the Clustalw is still not execuatable. Did I did the right setting?  Does anyone have this kind of experience? 
> 
>Thanks in advance.
>Jane
> 
>
>_______________________________________________
>Bioperl-l mailing list
>Bioperl-l at portal.open-bio.org
>http://portal.open-bio.org/mailman/listinfo/bioperl-l
>  
>

-- 
I like nonsense, it wakes up the brain cells.
		-- Dr. Seuss

Blaxter Nematode Genomics Group  |
School of Biological Sciences    |
Ashworth Laboratories            | tel: +44 131 650 7403
University of Edinburgh          | web: www.nematodes.org
Edinburgh                        |
EH9 3JT                          |
UK                               |	




More information about the Bioperl-l mailing list