[Bioperl-l] Bptutorial.pl

Jason Stajich jason@cgt.mc.duke.edu
Thu, 19 Dec 2002 21:31:53 -0500 (EST)


>
> I think that exists_blast, exists_clustal and exists_tcoffee should at
> least be reinstated with the message that they are now "deprecated" and
> will be removed in the future and the user is advised to use
> Bio::Root::IO::exists_exe instead. Otherwise lots of scripts will crash
> when people install/update bioperl-run.
>
actually not quite true - see below.

> Second when I changed bptutorial to use Bio::Root::IO::exists_exe, the
> script still fails (ie the executable can’t be found).  As far as I can
> tell this is because exists_exe just looks for the executable in the
> $PATH whereas previously it was possible to locate the executable using
> the $CLUSTALDIR environmental variable.  Is there any way to enable
> exists_exe to find an executable which is not in the $PATH, now?  If it
> is possible, let me know and I’ll make sure it is documented in the
> tutorial.  If it isn’t possible any more, I think I should submit a bug
> report.

Actually they've been all replaced with the same method executable.
This method is informed of the program exe name - see the BEGIN {}
block in each of these modules as well as the executable method.

You should call $obj->executable() to get the executable for the program
you are running.  This will first search your CLUSTALDIR or TCOFFEEDIR if
it is defined, otherwise it tries to find it in your path.  For blast the
executable method takes an argument $programname which is 'blastall',
'bl2seq', etc.

You can also use this method to explictly set the full path to the
executable with $clustalw_factory->executable('/opt/bioinf/bin/clustalw');

I did not like the two step method of calling exists_clustal and then a
second method to get the path to the exe.  Rather if executable returns
undef then we couldn't find the exe based on the strategy outlined above.
This is how the tests have been updated in bioperl-run/t/ so I would use
those as a guide.

Peter - I think it makes sense perhaps to split the parts which run
applications out of bptutorial into something in
bioperl-run/bpruntutorial.pl or core/bpruntutorial.pl to avoid throwing
people for too much of a loop.  What do you think?



>
> Cheers
>
> Peter
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>

--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu