julio_514 has asked for the wisdom of the Perl Monks concerning the following question:

Dear monks, I am trying to write a simple script to align 2 sequence objects. The problem is that I get the following error message: Use of uninitialized value in concatenation (.) or string at C:/Perl/site/lib/Bio/Tools/Run/Alignment/Clustalw.pm line 645. Use of uninitialized value in concatenation (.) or string at C:/Perl/site/lib/Bio/Tools/Run/Alignment/Clustalw.pm line 646. 'align' is not recognized as an internal or external command, operable program or batch file. I would really appreciate some help. Here is my code.
#c:\perl\perl.exe use strict; use warnings; use Bio::Seq; use Bio::Tools::Run::Alignment::Clustalw; BEGIN { $ENV{CLUSTALDIR} = 'c:/CLUSTALW2/' } my $dna_seq = "NACCNANCGGGGGNNAAANTNNNACACTNCNGGGGGGNTNNTTANTGNGTNACAC +ANNNGNCTNNNGGNNNCNANANTCNACAG +GACTTAGAAGNCTNCANNGGANCATNCCCTGCTANACN +ANGNNANCACTCTNCAGNNCNNANCNTNGGGCNNCCTNNTCNNTNNNCCATNNGNGCTNC +ANNANCN +TANANNGATNANTANAGNANNTTNTGTTATGNNGNGTG"; my$tn5_seq = "GGGGNCCCGCTTACGATACTTCGTTATAGCATACATTATACGAAGTTATCAGATCC +CCCTGGATGGAAAACGGGAAAGGTTCCG +TCCAGGACGCTACTTGTGTATAAGAGTCAGGTT"; $dna_seq =~ s/\s+//g; $tn5_seq =~ s/\s+//g; my $id_1 = 'test1_DNA'; my $id_2 = 'test2_DNA'; my $alphabet = 'DNA'; my $seq_obj = Bio::Seq->new(-seq => $dna_seq, -display_id => $id_1, -alphabet => $alphabet); my $tn5_obj = Bio::Seq->new(-seq => $tn5_seq, -display_id => $id_2, -alphabet => $alphabet); my @params = ('ktuple' => 2, 'matrix' => 'BLOSUM'); my $factory = Bio::Tools::Run::Alignment::Clustalw->new(@params); my @seq_array =(); push @seq_array, $seq_obj, $tn5_obj; my $seq_array_ref = \@seq_array; my $aln = $factory->align($seq_array_ref);

Replies are listed 'Best First'.
Re: bioperl and clustalw help
by Anonymous Monk on Oct 23, 2008 at 09:41 UTC
    which line of your code triggers the error, $factory->align? What do you get after you turn on debugging (I think its something like ->new( -verbose=>1 ) or $ENV{BIOPERLDEBUG}=1;)?
      Ok, I solved it:) The problem was with clustalw2. Somehow, this version of clustal have a problem with the command line... I installed clustalw1.8 and everything is fine know. Thanks for the reply anyway!:)
        hi. can i know where to get the installation of clusterw1.8