[Bioperl-l] Running BLAT with BioPerl

Jason Stajich jason.stajich at duke.edu
Fri Feb 10 20:36:04 UTC 2006


On Feb 10, 2006, at 3:09 PM, Victor 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.
>
Hmm are you sure you are looking at the 1.5.1 code and/or what is in  
CVS?

> 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?
>
Well maybe as another parser option - I believe I added/edited it to  
use the PSL parser in Bio::SearchIO is that not what you see?

Ick there are also some system commands in this module too which need  
to be removed and replaced with File::Copy or figure out how to  
remove them all together.


> Brian/Jason. Does that sound like a good idea?

But yes it needs some TLC
  I'm not sure I know enough about Config::General  to say  yes or no  
- but all of the run modules need some help in standardization so I  
would propose trying to integrate some changes into the base class  
(WrapperBase) that can be utilized by all the sub-classes -- if you  
want to use this as a model for how to do it that would be great too.

thx,
-j
>
> 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 =
>>>> >  
>>>> "TGAAATAAAACTCAGTATGAAATAAAACTCAGTATGAAATAAAACTCAGTATGAAATAAAACTCAG 
>>>> TA";
>>>> >
>>>> > 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>  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>
>>>>
>>>>
>>>
>>>
>>
>
> --
> Jason Stajich
> Duke University
> http://www.duke.edu/~jes12
>
>
>

--
Jason Stajich
Duke University
http://www.duke.edu/~jes12






More information about the Bioperl-l mailing list