Fields, Christopher J | 15 May 18:38 2014

Re: Bioperl "align is not recognized as internal or external command"

On May 15, 2014, at 11:27 AM, Francisco J. Ossandón <fossandonc <at> hotmail.com> wrote:

> A little off topic question...
> 
> I also replied to Anil and the reply went to 'bioperl-l <at> googlegroups.com'
> too (pointed out the problem with the CLUSTALDIR containing a file path). I
> see my reply there
> (https://groups.google.com/forum/#!topic/bioperl-l/36b6NDRD_6o) but not in
> the bioperl-l mailing list archive
> (http://lists.open-bio.org/pipermail/bioperl-l/2014-May/date.html). I
> thought that the Google group reply would also be forwarded to the mailing
> list, but it does not seem the case. Should I always add the copy to the
> mailing list??

No, that needs to be fixed.  Frankly I support a complete move over to Google Groups (as long as they don’t
decide to arbitrarily kill it, as Google sometimes does with it’s various services (see: code, reader,
notebook, wave, etc etc etc).  I’ll also be leading a possible BoF group at BOSC regarding possible
alternatives to a mail list for interaction.

> Now on topic with clustalw2. Taking the 'version' subroutine approach as
> example (my $string = `$prog -- 2>&1` ;), for setting "our $PROGRAM_NAME"
> value maybe "$PROGRAM_DIR /clustalw2" execution could be tested, and if it
> fails test for "$PROGRAM_DIR /clustalw" execution and if that fails then
> abort…

I would try to find a system-agnostic way of doing this, preferably at a higher level (a common method or
imported routine).  I believe there was some work towards this using IPC::Run3 (I think)

> By the way, I went to Clustalw2 page
> (http://www.ebi.ac.uk/Tools/msa/clustalw2/) and found a "Note: ClustalW2 is
> no longer being maintained. Please consider using the new version instead:
> Clustal Omega"! This means that now, besides 'clustalw2'
> (http://www.clustal.org/clustal2/), there is a new version
> (http://www.clustal.org/omega/) that also have a new executable name
> 'clustalo' (no idea if the arguments, inputs and outputs remains the same
> than previous versions)... If clustalo can pass the same tests, then it
> would have to be included as a valid executable name option.

Yep.  Basically, we need to ensure that the executable name is settable by the user and has a reasonable
default, then check for its presence (bailing in a meaningful way should it not be found).  The other
critical part is to make sure that the parameters are supported for the versions being added; tests
don’t always indicate that.

-c

> Cheers,
> 
> Francisco J. Ossandon
> 
> -----Mensaje original-----
> De: bioperl-l-bounces <at> lists.open-bio.org
> [mailto:bioperl-l-bounces <at> lists.open-bio.org] En nombre de Fields,
> Christopher J
> Enviado el: jueves, 15 de mayo de 2014 9:33
> Para: Paul Cantalupo
> CC: BioPerl List; Anil Kumar
> Asunto: Re: [Bioperl-l] Bioperl "align is not recognized as internal or
> external command"
> 
> It works on Mac (I recall it works on Linux as well).  The executable is
> named 'clustalw2', which can be symlinked to 'clustalw' if needed.  We could
> probably add support to deal with this...
> 
> chris
> 
> [cjfields <at> pyrimidine-laptop bioperl-run (master)]$ clustalw -help | head -n
> 4
> 
> CLUSTAL 2.1 Multiple Sequence Alignments [cjfields <at> pyrimidine-laptop
> bioperl-run (master)]$ prove -lrv t/Clustalw.t t/Clustalw.t ..
> 1..45
> ok 1 - use Bio::Tools::Run::Alignment::Clustalw;
> ok 2 - use Bio::SimpleAlign;
> ok 3 - use Bio::AlignIO;
> ok 4 - use Bio::SeqIO;
> ok 5 - use File::Spec;
> ok 6 - Found input file
> ok 7 - Found profile1 file
> ok 8 - Found profile2 file
> ok 9 - An object of class 'Bio::Tools::Run::Alignment::Clustalw' isa
> 'Bio::Tools::Run::Alignment::Clustalw'
> ok 10 - program_dir returned correct default ok 11 - error_string returned
> correct default ok 12 - outfile_name returned correct default ok 13 -
> bootstrap returned correct default ok 14 - Correct exe default name ok 15 -
> Supported program version 2.1 ok 16 - No error occured ok 17 - outfile_name
> returned something ok 18 - An object of class 'Bio::SimpleAlign' isa
> 'Bio::SimpleAlign'
> ok 19 - Correct number of seqs returned
> ok 20 - Score
> ok 21 - An object of class 'Bio::SimpleAlign' isa 'Bio::SimpleAlign'
> ok 22 - Correct number of seqs returned
> ok 23 - Got correct sequence by position ok 24 - An object of class
> 'Bio::Tree::Tree' isa 'Bio::Tree::Tree'
> ok 25 - An object of class 'Bio::SimpleAlign' isa 'Bio::SimpleAlign'
> ok 26 - Correct number of seqs returned
> ok 27 - An object of class 'Bio::SimpleAlign' isa 'Bio::SimpleAlign'
> ok 28 - An object of class 'Bio::Tree::Tree' isa 'Bio::Tree::Tree'
> ok 29 - An object of class 'Bio::SimpleAlign' isa 'Bio::SimpleAlign'
> ok 30 - An object of class 'Bio::Tree::Tree' isa 'Bio::Tree::Tree'
> ok 31 - footprinting worked
> ok 32 - Got correct sequence by position ok 33 - Got correct sequence by
> position ok 34 - Set and got ktuple correctly ok 35 - Set and got topdiags
> correctly ok 36 - Set and got window correctly ok 37 - Set and got pairgap
> correctly ok 38 - Set and got fixedgap correctly ok 39 - Set and got
> floatgap correctly ok 40 - Set and got matrix correctly ok 41 - Set and got
> type correctly ok 42 - Set and got output correctly ok 43 - Set and got
> outfile correctly ok 44 - set and got quiet correctly ok 45 - set and got
> bootstrap correctly ok All tests successful.
> Files=1, Tests=45,  2 wallclock secs ( 0.03 usr  0.01 sys +  2.01 cusr  0.22
> csys =  2.27 CPU)
> Result: PASS
> 
> On May 15, 2014, at 6:57 AM, Paul Cantalupo <pcantalupo <at> gmail.com> wrote:
> 
>> Hi all,
>> 
>> I forgot to add bioperl list to my reply to Anil. This may help 
>> somebody else with the same problem. Can somebody chime in if this 
>> should be reported as a bug?
>> 
>> Thank you,
>> 
>> Paul
>> 
>> Paul Cantalupo
>> University of Pittsburgh
>> 
>> 
>> ---------- Forwarded message ----------
>> From: Anil Kumar <anikng <at> gmail.com>
>> Date: Wed, May 14, 2014 at 9:19 PM
>> Subject: Re: [Bioperl-l] Bioperl "align is not recognized as internal 
>> or external command"
>> To: Paul Cantalupo <pcantalupo <at> gmail.com>
>> 
>> 
>> Hi Cantalupo,
>> 
>> As you mentioned, it was the problem with ClustalW version. When i 
>> re-installed older version of ClustalW 1.8, it worked...!!
>> Thank you very much for your good suggestion.!!!
>> 
>> An Lee, Seoul,
>> ROK
>> 
>> 
>> On Thu, May 15, 2014 at 12:10 AM, Paul Cantalupo
> <pcantalupo <at> gmail.com>wrote:
>> 
>>> Hi,
>>> 
>>> I'm not sure if you are having the same issue, but check out:
>>> http://www.perlmonks.org/?node_id=718819
>>> 
>>> Paul
>>> 
>>> 
>>> 
>>> Paul Cantalupo
>>> University of Pittsburgh
>>> 
>>> 
>>> On Thu, May 1, 2014 at 12:47 AM, <anikng <at> gmail.com> wrote:
>>> 
>>>> Hi Forum members,
>>>> 
>>>> My purpose is to do multiple sequence alignment using perl script 
>>>> and Bioperl mdules. For that I installed Bioperl  and Clusalw2 (2.1) 
>>>> in my Windows 7. When i tried to run a small code (attached below), 
>>>> it is showing some error as "align is not recognized as internal or 
>>>> external command etc etc.. A screen shot is attached.
>>>> 
>>>> I saw someone post similar error, but could not find any solution. 
>>>> So, kindly suggest me the solution.
>>>> 
>>>> 
>>>> An Lee, Seoul,
>>>> ROK
>>>> 
>>>> 
>>>> 
>>>> Code,
>>>> 
>>>> #!/usr/bin/perl
>>>> use Bio::Seq;
>>>> use Bio::Tools::Run::Alignment::Clustalw;
>>>> use Bio::AlignIO;
>>>> 
>>>> BEGIN { $ENV{CLUSTALDIR} = 'C:/ClustalW2/clustalw2.exe'}
>>>> 
>>>> $factory = Bio::Tools::Run::Alignment::Clustalw->new(-matrix => 
>>>> 'BLOSUM'); $ktuple = 3; $factory->ktuple($ktuple);  # change the 
>>>> parameter before executing
>>>> 
>>>> $in="1.fasta";
>>>> $aln = $factory->align($in);
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Bioperl-l mailing list
>>>> Bioperl-l <at> lists.open-bio.org
>>>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>>>> 
>>> 
>>> 
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l <at> lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
> 
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l <at> lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
> 

Gmane