[Bioperl-l] Running BLAT with BioPerl

Brian Osborne osborne1 at optonline.net
Fri Feb 10 16:49:18 EST 2006


Victor,

Just a note on "convention", excuse me if this is obvious. A few different
greps on the modules in bioperl-run shows that executable() gets or sets the
full path to the program in question, program() or program_name() gets or
sets the name of the app (e.g. "blat"). program_dir() does what it sounds
like. So you're right, "($self->executable,$self->program_name)", doesn't
make sense.

I can't speak to Config::General but I'd say that my first concern would be
that the things works in the normal way, either by naming parameters or by
passing an array of arguments, but not a mixture of both!

Of course you're right in thinking that tying execution to parsing is a good
idea, and it looks like this is done already, just glancing at t/Blat.t.

Brian O.


On 2/10/06 3:09 PM, "Victor" <victor.ruotti at gmail.com> wrote:

> Hi Jason,
> Well, in my env. BLATDIR was not setup at all. When setting BLATDIR to
> /usr/local/bin, I get the same problem. I think this might have to do with
> the _run internal method/sub. If you look at that subroutine, you'll see
> that it is using both $self->executable and $self->program_name. The test
> passes fine, but we might need to write a better test for this particular
> case.
> 
> Instead of saying:
>      my $str= Bio::Root::IO->catfile($self->executable,$self->program_name);
> I think the author meant to say:
>      my $str=
> Bio::Root::IO->catfile($self->program_dir,$self->program_name);
> 
> I quickly used Data::Dumper on both executate and program_name and this is
> what I get:
> $VAR1 = 'blat';
> $VAR1 = 'blat';
> 
> So the path is hardcoded to be /usr/local/bin/blat/blat when calling run
> though factory.
> 
> I'd like to change the constructor a bit to deal with the params a little
> better and include a config file using
> Config::General. Also, I noticed that there is a another Blat.pm module, a
> parser module. Should we integrate this parser with the blat run module?
> 
> Brian/Jason. Does that sound like a good idea?
> 
> Victor
> 
> 
> On 2/10/06, Jason Stajich <jason.stajich at duke.edu> wrote:
>> 
>> brian -   just FYI -
>> 
>> The AUTOLOAD stuff is present a great number of the run modules so  this
>> is standard per se in that set.
>> 
>> I think Victor's problem may have been the BLATDIR env variable pointing
>> to /usr/local/bin/blat instead of /usr/local/bin - is that the case victor?
>> 
>> tests passed for me before I did the 1.5.1 release for  this module so it
>> basically works.   It definitely needs a carekeeper as lot of these run
>> modules were built during the fugu group annotation project and never got
>> audited/re-vised after that.
>> 
>> 
>> -jason
>> On Feb 10, 2006, at 11:34 AM, Brian Osborne wrote:
>> 
>> Victor,
>> 
>> Fantastic, this is certainly a module in need, in fact there was already a
>> note on this in the Wiki, I'll update it:
>> 
>> http://bioperl.open-bio.org/wiki/Orphan_modules
>> 
>> So all I did was:
>> 
>>> cd bioperl-run
>>> perl ­I. -w t/Blat.t
>> 
>> This is the most recent bioperl-run, the live version, and all tests
>> passed. I'd downloaded the most recent binaries and put them in my
>> /usr/local/bin, already in my PATH. That's it.
>> 
>> That's the saddest looking new() I've ever seen in Bioperl, a mixture of
>> named and unnamed parameters like that, how bizarre. The "proper" way, of
>> course, is to use _rearrange, and not use AUTOLOAD.
>> 
>> Thanks again,
>> 
>> Brian O.
>> 
>> 
>> On 2/10/06 11:02 AM, "Victor" <victor.ruotti at gmail.com> wrote:
>> 
>> Brian,
>> I'd be happy to do that. Can you send me a quick snap on how you got it to
>> work first. I'd like to see what is working first, before I start fixing
>> things.
>> 
>> And yes I'll take a look at the Blat.t to see more on it.
>> 
>> Victor
>> 
>> 
>> On 2/9/06, *Brian Osborne* <osborne1 at optonline.net> wrote:
>> 
>> Victor,
>> 
>> Yes, it may be that blat is not in your path, bioperl-run/t/Blat.t is
>> working for me even though I haven't set BLATDIR. This is using the latest
>> blat, v. 33.
>> 
>> There is a problem here though, you can see it if you read Blat.t. The
>> constructor does not look like your usual new():
>> 
>> my $factory = Bio::Tools::Run::Alignment::Blat->new('quiet'  => 1,
>> 
>> -verbose => $verbose,
>>                             "DB"     => $db);
>> 
>> Unfortunate - would you be willing to do more than add a useful SYNOPSIS
>> and
>> actually fix new()? There is a subtext here, we're trying to find people
>> who
>> would be willing to maintain useful modules like these, the ideal person
>> in
>> this case would be someone who'd regularly use the module.
>> 
>> Brian O.
>> 
>> 
>> On 2/9/06 6:22 PM, "Victor" <victor.ruotti at gmail.com> wrote:
>> 
>>> Hi,
>>> Does anyone know if the Bio/Tools/Run/Alignment/Blat.pm module is up to
>> date
>>> in the lastest bioperl release?
>>> 
>>> 
>>> 
>>> use Bio::Tools::Run::Alignment::Blat;
>>> my $factory = Bio::Tools::Run::Alignment::Blat->new();
>>> my $seq =
>>> "TGAAATAAAACTCAGTATGAAATAAAACTCAGTATGAAATAAAACTCAGTATGAAATAAAACTCAGTA";
>>> 
>>> my @feats = $factory->run( $seq);
>>> 
>>> Here is what I get when tring to use it:
>>> 
>>> ------------- EXCEPTION: Bio::Root::Exception -------------
>>> MSG: Blat call (/usr/local/bin/blat/blat -out=blast  TGAAATAAAACTCAGTA
>>> /tmp/fB09bp5F76) crashed: -1
>>> 
>>> Notice that it is using "blat' twice in the path. The way that I fixed
>> this
>>> is by going to the blat.pm <http://blat.pm> <http://blat.pm>  module and
>> changing the following lines:
>>> #my $str= Bio::Root::IO->catfile($self->executable,$self->program_name);
>>> my $str= Bio::Root::IO->catfile($self->program_name);
>>> 
>>> Any ideas, maybe I'm missing the $ENV variable somewhere?
>>> I'd like to avoid making this change. Also does anyone have a known
>> synopsis
>>> of this blat module (where to set the parameters, and whether it allows
>> you
>>> to have a config file).
>>> I'll be happy to add a better synopsis to the module if needed.
>>> 
>>> Thanks in advance,
>>> Victor
>>> 
>>> _______________________________________________
>>> Bioperl-l mailing list
>>> Bioperl-l at lists.open-bio.org
>>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>> <http://lists.open-bio.org/mailman/listinfo/bioperl-l><http://lists.open-bio.
>> org/mailman/listinfo/bioperl-l>
>> 
>> 
>> 
>> 
>> 
>> 
>> --
>> Jason Stajich
>> Duke University
>> http://www.duke.edu/~jes12 <http://www.duke.edu/%7Ejes12>
>> 
>> 
>> 
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l





More information about the Bioperl-l mailing list