Skip to content
This repository
Browse code

awkward workaround for search options=none bug

  • Loading branch information...
commit 248601a0e77616c77c61ec61410a2745894c886f 1 parent 0405e24
Lincoln Stein lstein authored
5 lib/Bio/Graphics/Browser2/Region.pm
@@ -6,7 +6,7 @@ package Bio::Graphics::Browser2::Region;
6 6 use strict;
7 7 use warnings;
8 8 use Bio::Graphics::Browser2::Shellwords;
9   -use constant DEBUG=>0;
  9 +use constant DEBUG=>1;
10 10
11 11 sub new {
12 12 my $self = shift;
@@ -198,6 +198,7 @@ sub get_whole_segment {
198 198 sub search_db {
199 199 my $self = shift;
200 200 my $args = shift;
  201 + warn join ' ',%$args;
201 202 my ($features);
202 203 if (my $name = $args->{-search_term}) {
203 204 $name =~ tr/a-zA-Z0-9|.'"_*?: ;+-\/\#\[\]//cd; # remove rude/naughty characters
@@ -216,6 +217,7 @@ sub search_db {
216 217
217 218 sub lookup_features {
218 219 my $self = shift;
  220 + warn join ',',@_;
219 221 my ($name,$start,$stop,$class,$literal_name,$id) = @_;
220 222 my $source = $self->source;
221 223
@@ -233,6 +235,7 @@ sub lookup_features {
233 235
234 236 if (defined $id && $db->can('get_feature_by_id')) { # this overrides everything else
235 237 my $f = $db->get_feature_by_id($id);
  238 + warn "\$db->get_feature_by_id($id) got $f";
236 239 return $f ? [$f] : [];
237 240 }
238 241
4 lib/Bio/Graphics/Browser2/RegionSearch.pm
@@ -12,7 +12,7 @@ use HTTP::Request::Common 'POST';
12 12 use Carp 'cluck','croak';
13 13 use Storable 'nfreeze','thaw';
14 14
15   -use constant DEBUG => 0;
  15 +use constant DEBUG => 1;
16 16
17 17 # search multiple databases using crazy heuristics
18 18
@@ -398,7 +398,7 @@ sub _search_features_locally {
398 398
399 399 for my $dbid (@dbids) {
400 400 my $opts = $self->source->search_options($dbid);
401   - next if $opts =~ /none/i;
  401 + next if $opts =~ /none/i && $args->{-name} !~ /^id:/;
402 402 warn "searching in ",$dbid if DEBUG;
403 403 my $db = $self->source->open_database($dbid);
404 404 next if $seenit{$db}++;

0 comments on commit 248601a

Please sign in to comment.
Something went wrong with that request. Please try again.