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

hello everybody, i just installed perl, bioperl and clustalw. I have near one year from the last time i worked with perl. Too many errors not leeting me use bioperl modules stopped me back then fromm keeping up with perl.No i m here again and i want your help. i have a quite easy task for a monk, but for a newbie like me its a bit tricky.All i have to do is a multile allingnment of a protein fasta file using clustalw.

#!/usr/bin/perl use warnings; use strict; use Bio::AlignIO; use Bio::SeqIO; use Bio::Tools::Run::Alignment::Clustalw; my $file = shift or die; # Get filename from command prompt. my $factory = Bio::Tools::Run::Alignment::Clustalw->new(-matrix => 'BL +OSUM'); my $ktuple = 3; $factory->ktuple($ktuple); my $inseq = Bio::SeqIO->new( -file => "<$file", -format => $format ); my $seq; my @seq_array; while ($seq = $inseq->next_seq) { push(@seq_array, $seq); } # Now we do the actual alignment. my $seq_array_ref = \@seq_array; my $aln = $factory->align($seq_array_ref);

Cant see if this code actually Works,beacause of this anoynig message :Can't locate Bio/Tools/Run/Alignment/Clustalw.pm in @INC (you may need to install the Bio::Tools::Run::Alignment::Clustalw module) (@INC contains: C:/Perl64/site/lib C:/Perl64/lib .) at c3.pl line 8. BEGIN failed--compilation aborted at c3.pl line 8.

Any help will be much apreciated!Its extremely important to finish my task by any means as soon as possible

Replies are listed 'Best First'.
Re: Clustalw and bioperl
by 1nickt (Canon) on Mar 12, 2016 at 02:43 UTC

    That "annoying message" is Perl telling you quite clearly that you haven't installed one of the modules you are trying to use in your script. What happens when you type:

    $ cpan Bio::Tools::Run::Alignment::Clustalw
    at your command line?


    The way forward always starts with a minimal test.
      .... .... .... Test Summary Report ------------------- t\Blat.t (Wstat: 512 Tests: 4 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 33 tests but ran 4. t\Phyml.t (Wstat: 512 Tests: 11 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 47 tests but ran 11. t\RepeatMasker.t (Wstat: 512 Tests: 2 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 12 tests but ran 2. Files=80, Tests=1404, 181 wallclock secs ( 1.27 usr + 0.66 sys = 1.9 +2 CPU) Result: FAIL Failed 3/80 test programs. 0/1404 subtests failed. CJFIELDS/BioPerl-Run-1.006900.tar.gz C:\Perl64\bin\perl.exe ./Build test -- NOT OK //hint// to see the cpan-testers results for installing this module, t +ry: reports CJFIELDS/BioPerl-Run-1.006900.tar.gz

      And of course the same error happens again Any clue plz???

        I do not really want to bash Windows installations, but the sensible thing to do would be to bite the bullet and use Linux (without losing your Windows, of course):

        Option 1:

        Install Virtualbox on your windows, and download a virtualbox Bio image, ready to use.

        Option2:

        Download Bio-Linux DVD, and boot from USBstick or DVD. There everything "just works" (albeit a bit old now, as the image is 2 years old by now. It still works out of the box)

        (you can combine those, but installing your own Linux in virtualbox might be a bit more challenging, I guess you just want it working, and not fiddle with Linux...)

        ps: I run Debian, and the cpan command to install the libraries worked.

        I would next run the failing tests one at a time to see why they are failing. Since the test scripts appear to be crashing early (judging by how many tests are being planned versus being run), my guess is that there's another module not installed or misconfigured.

        Test them one by one by changing into the installation folder and running:

        prove -lrv t\Blat.t
        ... etc.

        But I do think installing a Bioperl image on a linux VM sounds very sensible.


        The way forward always starts with a minimal test.