Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

tweaks to accommodate BlastPlus.pm

svn path=/bioperl-dev/trunk/; revision=16818
  • Loading branch information...
commit e7e94fd041ce189fa7218ee2a698ed6909fbad10 1 parent 19ee27b
maj authored
Showing with 12 additions and 8 deletions.
  1. +12 −6 Bio/Tools/Run/WrapperBase/CommandExts.pm
  2. +0 −2  t/WrapperMaker.t
View
18 Bio/Tools/Run/WrapperBase/CommandExts.pm
@@ -1441,17 +1441,22 @@ sub available_parameters {
my $subset = shift;
my $opts = $self->{'_options'};
my @ret;
+ my $pfx = $opts->{_prefixes}->{$self->command};
for ($subset) {
- (!defined || /^a/) && do {
+ !defined && do {
@ret = (@{$opts->{'_params'}}, @{$opts->{'_switches'}});
last;
};
+ m/^a/i && do {
+ @ret = grep /^$pfx/,(@{$opts->{'_params'}}, @{$opts->{'_switches'}});
+ last;
+ };
m/^p/i && do {
- @ret = @{$opts->{'_params'}};
+ @ret = grep /^$pfx/, @{$opts->{'_params'}};
last;
};
m/^s/i && do {
- @ret = @{$opts->{'_switches'}};
+ @ret = grep /^$pfx/, @{$opts->{'_switches'}};
last;
};
m/^c/i && do {
@@ -1465,6 +1470,7 @@ sub available_parameters {
$self->throw("available_parameters: unrecognized subset");
};
}
+ if ($subset =~ /^[psa]/i) { s/^.*\|// for (@ret); }
return @ret;
}
@@ -1495,7 +1501,7 @@ sub get_parameters {
$_ = "self_params";
}
else {
- @o = grep !/^_self/, @{$opts->{'_params'}};
+ @o = grep !/^_self|command/, @{$opts->{'_params'}};
last;
}
};
@@ -1524,7 +1530,7 @@ sub get_parameters {
$self->throw("get_parameters: unrecognized subset");
};
}
- s/^.*\|// for @o;
+ unless ($subset =~ /^a/i) { s/^.*\|// for (@o);}
for (@o) {
push(@ret, $_, $self->$_) if $self->can($_) && defined $self->$_;
}
@@ -1539,7 +1545,7 @@ sub get_parameters {
sub _massage_options {
my $self = shift;
my %args;
- tie my %args, 'Tie::IxHash' if $HAVE_IXHASH;
+ tie %args, 'Tie::IxHash' if $HAVE_IXHASH;
%args = @_;
my @added;
my @removed;
View
2  t/WrapperMaker.t
@@ -85,7 +85,6 @@ SKIP : {
my @ls = readdir $d;
my @lsw = split("\n", $lsfac->stdout);
- $DB::single=1;
is_deeply([sort @lsw], [sort @ls] , "return ok");
1;
}
@@ -111,7 +110,6 @@ ok $pf->reset_parameters( -command => 'test1',
-module => 'Test::More'
]), "set parms (3)";
is (join(' ',@{$pf->_translate_params}), "-M Test::More test1 -b", "xlt parms (3)");
-$DB::single =1;
ok $pf->reset_parameters( -command => 'test1',
-freen => 1 );
ok $pf->needed, "coreq switch massage";
Please sign in to comment.
Something went wrong with that request. Please try again.