[Bioperl-l] How to run blastn with -task blastn option from Bio::Tools::Run::StandAloneBlastPlus?

Chris Fields cjfields at illinois.edu
Wed Jun 9 10:57:17 EDT 2010


Peng, 

If you think this is a bug, can you submit it to bugzilla?  It's very possible it's implemented but I'm not completely familiar with the code yet (though I will be very soon!).

Mark could also probably answer most of these questions but I think he's been pretty busy as of late, but I can probably take a look.

chris

On Jun 9, 2010, at 9:51 AM, Peng Yu wrote:

> My original code use -method=>'blastn' as
> Bio::Tools::Run::StandAloneBlastPlus's option, which is not equivalent
> to blast+'s command line option -task blastn.
> 
> 
> On Tue, Jun 8, 2010 at 11:10 PM, Smithies, Russell
> <Russell.Smithies at agresearch.co.nz> wrote:
>> 
>> 
>>> -----Original Message-----
>>> From: Peng Yu [mailto:pengyu.ut at gmail.com]
>>> Sent: Wednesday, 9 June 2010 4:10 p.m.
>>> To: Smithies, Russell
>>> Subject: Re: [Bioperl-l] How to run blastn with -task blastn option from
>>> Bio::Tools::Run::StandAloneBlastPlus?
>>> 
>>> I think it is better to document the mapping between blast options and
>>> bioperl options. I searched 'task', but I don't find anything. Thank
>>> you for letting me know.
>>> 
>>> On Tue, Jun 8, 2010 at 11:06 PM, Smithies, Russell
>>> <Russell.Smithies at agresearch.co.nz> wrote:
>>>> Bioperl's equivalent is blastn -task blastn -query first.fa -subject
>>> second.fa
>>>> We've just used 'method' instead of 'task'.
>>>> 
>>>> You can always use the legacy_blast.pl script that comes with blast+
>>> then you can just use your old bl2seq commands.
>>>> 
>>>> --Russell
>>>> 
>>>>> -----Original Message-----
>>>>> From: Peng Yu [mailto:pengyu.ut at gmail.com]
>>>>> Sent: Wednesday, 9 June 2010 4:03 p.m.
>>>>> To: Smithies, Russell
>>>>> Subject: Re: [Bioperl-l] How to run blastn with -task blastn option
>>> from
>>>>> Bio::Tools::Run::StandAloneBlastPlus?
>>>>> 
>>>>> I've solved my problem by using the wrapper. Note that this is a hack
>>>>> as it is not done in bioperl.
>>>>> $ cat `which blastn`
>>>>> #!/usr/bin/env bash
>>>>> 
>>>>> /myinstallation/blastn -task blastn $@
>>>>> 
>>>>> 
>>>>> Anyway, I restate my original problem below.
>>>>> 
>>>>> bioperl's bl2seq by default is equivalent to the following command.
>>>>> blastn -query first.fa -subject second.fa
>>>>> 
>>>>> I want to add the option '-task blastn'.
>>>>> blastn -task blastn -query first.fa -subject second.fa
>>>>> 
>>>>> But I don't find such option in bioperl's bl2seq.
>>>>> 
>>>>> On Tue, Jun 8, 2010 at 10:58 PM, Smithies, Russell
>>>>> <Russell.Smithies at agresearch.co.nz> wrote:
>>>>>> I've lost track of what your main problem is, please restate your
>>>>> original question?
>>>>>> I.e. what isn't working in Bio::Tools::Run::StandAloneBlastPlus or
>>> what
>>>>> part of the documentation is incorrect?
>>>>>> 
>>>>>> 
>>>>>> --Russell
>>>>>> 
>>>>>> 
>>>>>>> -----Original Message-----
>>>>>>> From: Peng Yu [mailto:pengyu.ut at gmail.com]
>>>>>>> Sent: Wednesday, 9 June 2010 3:53 p.m.
>>>>>>> To: Smithies, Russell
>>>>>>> Subject: Re: [Bioperl-l] How to run blastn with -task blastn option
>>>>> from
>>>>>>> Bio::Tools::Run::StandAloneBlastPlus?
>>>>>>> 
>>>>>>> I knew this I should use blastn as bl2seq command is not available
>>> in
>>>>>>> BLAST+. I'm not sure what you think I should read?
>>>>>>> 
>>>>>>> On Tue, Jun 8, 2010 at 10:47 PM, Smithies, Russell
>>>>>>> <Russell.Smithies at agresearch.co.nz> wrote:
>>>>>>>> I really think you need to spend more time reading and less time
>>>>>>> emailing.
>>>>>>>> 
>>>>>>>> 
>>>>> http://www.ncbi.nlm.nih.gov/bookshelf/br.fcgi?book=newsncbi&part=Jan09
>>>>>>>> The BLAST+ package includes the ability to compare two or more
>>>>> sequences
>>>>>>> to each other in each of the search programs. Using the -subject
>>>>>  option
>>>>>>> instead of the -db will cause any of the search programs to behave
>>> as a
>>>>>>> BLAST 2 sequences program. This eliminates the need for the BLAST 2
>>>>>>> sequences utility (bl2seq) included in the traditional BLAST
>>> package.
>>>>>>>> 
>>>>>>>> While it's still called 'bl2seq' in StandAloneBlastPlus, it's just
>>> a
>>>>>>> wrapper as there's no longer a bl2seq executable as there was with
>>> the
>>>>>>> older version of BLAST.
>>>>>>>> 
>>>>>>>> 
>>>>>>>> --Russell
>>>>>>>> 
>>>>>>>>> -----Original Message-----
>>>>>>>>> From: Peng Yu [mailto:pengyu.ut at gmail.com]
>>>>>>>>> Sent: Wednesday, 9 June 2010 3:37 p.m.
>>>>>>>>> To: Smithies, Russell
>>>>>>>>> Cc: bioperl-l at lists.open-bio.org
>>>>>>>>> Subject: Re: [Bioperl-l] How to run blastn with -task blastn
>>> option
>>>>>>> from
>>>>>>>>> Bio::Tools::Run::StandAloneBlastPlus?
>>>>>>>>> 
>>>>>>>>> I made a wrapper. Then I call bl2seq in bioperl. The result
>>> changes,
>>>>>>>>> which means bioperl call blastn rather than bl2seq in the command
>>>>>>>>> line. The results are consistent between bioperl and blastn
>>> command
>>>>>>>>> line.
>>>>>>>>> 
>>>>>>>>> $ cat `which blastn`
>>>>>>>>> #!/usr/bin/env bash
>>>>>>>>> 
>>>>>>>>> /myinstallation/blastn -task blastn $@
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> On Tue, Jun 8, 2010 at 10:31 PM, Smithies, Russell
>>>>>>>>> <Russell.Smithies at agresearch.co.nz> wrote:
>>>>>>>>>> Without digging thru the code, I think the developer can call
>>> the
>>>>>>>>> parameters whatever he likes and if he wants to use "-method "
>>>>> instead
>>>>>>> of
>>>>>>>>> "-task " there's probably a good reason (right MAJ?)
>>>>>>>>>> 
>>>>>>>>>> If you write code as in the docs, does it give you the same
>>>>> results
>>>>>>> as
>>>>>>>>> when you run bl2seq manually from the command line?
>>>>>>>>>> When you run it via BioPerl, does " -method => 'blastn' " give
>>> you
>>>>> a
>>>>>>>>> different result to " -method => 'megablast' " or " -method =>
>>> 'dc-
>>>>>>>>> megablast' "
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> --Russell
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>>> -----Original Message-----
>>>>>>>>>>> From: Peng Yu [mailto:pengyu.ut at gmail.com]
>>>>>>>>>>> Sent: Wednesday, 9 June 2010 3:12 p.m.
>>>>>>>>>>> To: Smithies, Russell
>>>>>>>>>>> Cc: bioperl-l at lists.open-bio.org
>>>>>>>>>>> Subject: Re: [Bioperl-l] How to run blastn with -task blastn
>>>>> option
>>>>>>>>> from
>>>>>>>>>>> Bio::Tools::Run::StandAloneBlastPlus?
>>>>>>>>>>> 
>>>>>>>>>>> See the help page of blastn. By default blastn use the option
>>> "-
>>>>> task
>>>>>>>>>>> megablast", which is less sensitive than the option "-task
>>>>> blastn".
>>>>>>>>>>> 
>>>>>>>>>>> $ blastn -help
>>>>>>>>>>> ....
>>>>>>>>>>>  -task <String, Permissible values: 'blastn' 'blastn-short'
>>> 'dc-
>>>>>>>>> megablast'
>>>>>>>>>>>                   'megablast' 'vecscreen' >
>>>>>>>>>>>      Task to execute
>>>>>>>>>>>      Default = `megablast'
>>>>>>>>>>> ...
>>>>>>>>>>> 
>>>>>>>>>>> On Tue, Jun 8, 2010 at 10:09 PM, Smithies, Russell
>>>>>>>>>>> <Russell.Smithies at agresearch.co.nz> wrote:
>>>>>>>>>>>> Why are you trying to supply option '-task blastn' ??
>>>>>>>>>>>> I think the docs make it fairly clear that this is not one
>>> of
>>>>> the
>>>>>>>>>>> available parameters.
>>>>>>>>>>>> The option " -method => 'blastn' " (as detailed in the docs)
>>> is
>>>>>>> the
>>>>>>>>> one
>>>>>>>>>>> to use.
>>>>>>>>>>>> http://doc.bioperl.org/releases/bioperl-current/bioperl-
>>>>>>>>>>> run/lib/Bio/Tools/Run/StandAloneBlastPlus/BlastMethods.html
>>>>>>>>>>>> 
>>>>>>>>>>>> # create a factory:
>>>>>>>>>>>>  $fac = Bio::Tools::Run::StandAloneBlastPlus->new();
>>>>>>>>>>>> 
>>>>>>>>>>>> # do a bl2seq
>>>>>>>>>>>>  $fac->bl2seq( -method => 'blastn',
>>>>>>>>>>>>               -query => $seq_object_1,
>>>>>>>>>>>>               -subject => $seq_object_2 );
>>>>>>>>>>>> 
>>>>>>>>>>>> Unless I've missed something and
>>>>>>> Bio::Tools::Run::StandAloneBlastPlus
>>>>>>>>> is
>>>>>>>>>>> completely broken (which is possible as it's development code)
>>>>>>>>> something
>>>>>>>>>>> similar to the example should work.
>>>>>>>>>>>> 
>>>>>>>>>>>> --Russell
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>>> -----Original Message-----
>>>>>>>>>>>>> From: Peng Yu [mailto:pengyu.ut at gmail.com]
>>>>>>>>>>>>> Sent: Wednesday, 9 June 2010 2:21 p.m.
>>>>>>>>>>>>> To: Smithies, Russell
>>>>>>>>>>>>> Cc: bioperl-l at lists.open-bio.org
>>>>>>>>>>>>> Subject: Re: [Bioperl-l] How to run blastn with -task
>>> blastn
>>>>>>> option
>>>>>>>>>>> from
>>>>>>>>>>>>> Bio::Tools::Run::StandAloneBlastPlus?
>>>>>>>>>>>>> 
>>>>>>>>>>>>> On Tue, Jun 8, 2010 at 8:28 PM, Smithies, Russell
>>>>>>>>>>>>> <Russell.Smithies at agresearch.co.nz> wrote:
>>>>>>>>>>>>>> Have you read the docs?
>>>>>>>>>>>>>> 
>>> http://www.bioperl.org/wiki/HOWTO:BlastPlus#Running_bl2seq
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Yes. But they don't say how to supply option '-task blastn'
>>> to
>>>>>>>>> blastn.
>>>>>>>>>>> I
>>>>>>>>>>>>> tried
>>>>>>>>>>>>> 
>>>>>>>>>>>>> my $factory = Bio::Tools::Run::StandAloneBlastPlus->new(-
>>>>>>>>>>> task='blastn');
>>>>>>>>>>>>> 
>>>>>>>>>>>>> But it doesn't work.
>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Do query and subject ($seq1 and $seq2) need to be
>>> Bio::Seq
>>>>>>>>> objects?
>>>>>>>>>>>>> 
>>>>>>>>>>>>> I think so. I just get $seq1 and $seq2 from SeqIO. This is
>>> not
>>>>> my
>>>>>>>>>>> problem.
>>>>>>>>>>>>> 
>>>>>>>>>>>>>> --Russell
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> -----Original Message-----
>>>>>>>>>>>>>>> From: bioperl-l-bounces at lists.open-bio.org
>>> [mailto:bioperl-
>>>>> l-
>>>>>>>>>>>>>>> bounces at lists.open-bio.org] On Behalf Of Peng Yu
>>>>>>>>>>>>>>> Sent: Wednesday, 9 June 2010 1:00 p.m.
>>>>>>>>>>>>>>> To: bioperl-l at lists.open-bio.org
>>>>>>>>>>>>>>> Subject: [Bioperl-l] How to run blastn with -task blastn
>>>>>>> option
>>>>>>>>> from
>>>>>>>>>>>>>>> Bio::Tools::Run::StandAloneBlastPlus?
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> I need to use Bio::Tools::Run::StandAloneBlastPlus to
>>> run
>>>>> the
>>>>>>>>>>> following
>>>>>>>>>>>>>>> command.
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> blastn -task blastn -query first.fa -subject second.fa
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> I tried the following code, which works like without the
>>> '-
>>>>>>> task
>>>>>>>>>>>>>>> blastn' option. Would you please let me know how to
>>> supply
>>>>> the
>>>>>>>>>>> option
>>>>>>>>>>>>>>> in Bio::Tools::Run::StandAloneBlastPlus?
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> my $factory = Bio::Tools::Run::StandAloneBlastPlus-
>>>> new();
>>>>>>>>>>>>>>>   my $result=$factory->bl2seq(
>>>>>>>>>>>>>>>     -method=>'blastn',
>>>>>>>>>>>>>>>     -query=> $seq1,
>>>>>>>>>>>>>>>     -subject=> $seq2
>>>>>>>>>>>>>>>   );
>>>>>>>>>>>>>>>   $factory->cleanup;
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> Thank you for you help!
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>> Regards,
>>>>>>>>>>>>>>> Peng
>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>> Bioperl-l mailing list
>>>>>>>>>>>>>>> Bioperl-l at lists.open-bio.org
>>>>>>>>>>>>>>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>>>>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>> 
>>> =======================================================================
>>>>>>>>>>>>>> Attention: The information contained in this message
>>> and/or
>>>>>>>>>>> attachments
>>>>>>>>>>>>>> from AgResearch Limited is intended only for the persons
>>> or
>>>>>>>>> entities
>>>>>>>>>>>>>> to which it is addressed and may contain confidential
>>> and/or
>>>>>>>>>>> privileged
>>>>>>>>>>>>>> material. Any review, retransmission, dissemination or
>>> other
>>>>>>> use
>>>>>>>>> of,
>>>>>>>>>>> or
>>>>>>>>>>>>>> taking of any action in reliance upon, this information
>>> by
>>>>>>> persons
>>>>>>>>> or
>>>>>>>>>>>>>> entities other than the intended recipients is prohibited
>>> by
>>>>>>>>>>> AgResearch
>>>>>>>>>>>>>> Limited. If you have received this message in error,
>>> please
>>>>>>> notify
>>>>>>>>>>> the
>>>>>>>>>>>>>> sender immediately.
>>>>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>> 
>>> =======================================================================
>>>>>>>>>>>>>> 
>>>>>>>>>>>>> 
>>>>>>>>>>>>> 
>>>>>>>>>>>>> 
>>>>>>>>>>>>> --
>>>>>>>>>>>>> Regards,
>>>>>>>>>>>>> Peng
>>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> --
>>>>>>>>>>> Regards,
>>>>>>>>>>> Peng
>>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> --
>>>>>>>>> Regards,
>>>>>>>>> Peng
>>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> --
>>>>>>> Regards,
>>>>>>> Peng
>>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> Regards,
>>>>> Peng
>>>> 
>>> 
>>> 
>>> 
>>> --
>>> Regards,
>>> Peng
>> 
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>> 
> 
> 
> 
> -- 
> Regards,
> Peng
> 
> _______________________________________________
> 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