New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bio::Tools::Run::StandAloneBlastPlus "entrez_query" option #25

Open
cjfields opened this Issue Oct 8, 2015 · 3 comments

Comments

Projects
None yet
1 participant
@cjfields
Member

cjfields commented Oct 8, 2015


Author Name: Remi empty (Remi empty)
Original Redmine Issue: 3150, https://redmine.open-bio.org/issues/3150
Original Date: 2010-10-27
Original Assignee: Bioperl Guts


When running this code:

my $fac = Bio::Tools::Run::StandAloneBlastPlus->new(
-db_name => ‘nr’,
-remote => 1,
);

my $result = $fac->blastp(
-query => ‘NP_861128.fasta’,
-outfile => ‘query.bls’,
-method_args => [
-entrez_query => ‘txid2759[ORGN]’,
],
);

the option ‘-entrez_query’ doesn’t work.
I’ve looked to the code of Bio::Tools::Run::StandAloneBlastPlus and it seems that in the AUTOLOAD method, the options in -method_args are overwritten:

push @Args, (‘-method_args’ => [’remote’ => 1] ) if ($self>is_remote);

If I put the -entrez_query option directly in the AUTOLOAD method, it works.

push @Args, (‘-method_args’ => [(‘-remote’ => 1,entrez_query => ’txid2759[ORGN]’)] ) if ($self>is_remote);

@cjfields

This comment has been minimized.

Show comment
Hide comment
@cjfields

cjfields Oct 8, 2015

Member

Original Redmine Comment
Author Name: Remi empty
Original Date: 2010-10-27T08:27:05Z


Created an attachment (id=1551)
Dirty patch

Member

cjfields commented Oct 8, 2015


Original Redmine Comment
Author Name: Remi empty
Original Date: 2010-10-27T08:27:05Z


Created an attachment (id=1551)
Dirty patch

@cjfields

This comment has been minimized.

Show comment
Hide comment
@cjfields

cjfields Oct 8, 2015

Member

Original Redmine Comment
Author Name: Remi empty
Original Date: 2010-10-27T08:29:42Z


(From update of attachment 1551)

diff —git a/lib/Bio/Tools/Run/StandAloneBlastPlus.pm b/lib/Bio/Tools/Run/StandAloneBlastPlus.pm
index b13f464..cef2057 100755
—- a/lib/Bio/Tools/Run/StandAloneBlastPlus.pm
*_+ b/lib/Bio/Tools/Run/StandAloneBlastPlus.pm
@ -1289,6 +1289,7@ Finally, if $AUTOLOAD is pointing to a blast query method, AUTOLOAD
runs C with the C<-method> parameter appropriately set.

=cut

sub AUTOLOAD {
my $self = shift;
@ -1297,8 +1298,13@ sub AUTOLOAD {
$method =~ s/._:://;
my `ret;

if (grep /^$method$/, `Bio::Tools::Run::StandAloneBlastPlus::BlastMethods) {

- push `args, ('-method_args' => ['-remote' => 1] ) if ($self->is_remote);

  • return $self->run( -method => $method, args ); \>+ if ($self-\>is\_remote) { \>+ my %argsHash =args;
  •        push( `{$argsHash{-method\_args}} ,(‘-remote’ =\> 1) );
    
    >+ # push`args, ('-method_args' => ['-remote' => 1] ) if ($self->is_remote);
  •        `args = %argsHash;
    
    >+ }
    >+ return $self->run( -method => $method,args ); } if ($self->factory and $self->factory->can($method)) { # factory method return $self->factory->$method(args);
Member

cjfields commented Oct 8, 2015


Original Redmine Comment
Author Name: Remi empty
Original Date: 2010-10-27T08:29:42Z


(From update of attachment 1551)

diff —git a/lib/Bio/Tools/Run/StandAloneBlastPlus.pm b/lib/Bio/Tools/Run/StandAloneBlastPlus.pm
index b13f464..cef2057 100755
—- a/lib/Bio/Tools/Run/StandAloneBlastPlus.pm
*_+ b/lib/Bio/Tools/Run/StandAloneBlastPlus.pm
@ -1289,6 +1289,7@ Finally, if $AUTOLOAD is pointing to a blast query method, AUTOLOAD
runs C with the C<-method> parameter appropriately set.

=cut

sub AUTOLOAD {
my $self = shift;
@ -1297,8 +1298,13@ sub AUTOLOAD {
$method =~ s/._:://;
my `ret;

if (grep /^$method$/, `Bio::Tools::Run::StandAloneBlastPlus::BlastMethods) {

- push `args, ('-method_args' => ['-remote' => 1] ) if ($self->is_remote);

  • return $self->run( -method => $method, args ); \>+ if ($self-\>is\_remote) { \>+ my %argsHash =args;
  •        push( `{$argsHash{-method\_args}} ,(‘-remote’ =\> 1) );
    
    >+ # push`args, ('-method_args' => ['-remote' => 1] ) if ($self->is_remote);
  •        `args = %argsHash;
    
    >+ }
    >+ return $self->run( -method => $method,args ); } if ($self->factory and $self->factory->can($method)) { # factory method return $self->factory->$method(args);
@cjfields

This comment has been minimized.

Show comment
Hide comment
@cjfields

cjfields Oct 8, 2015

Member

Original Redmine Comment
Author Name: Remi empty
Original Date: 2010-10-27T08:43:25Z


*** Bug 3151 has been marked as a duplicate of this bug.***

Member

cjfields commented Oct 8, 2015


Original Redmine Comment
Author Name: Remi empty
Original Date: 2010-10-27T08:43:25Z


*** Bug 3151 has been marked as a duplicate of this bug.***

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment