Skip to content

Commit

Permalink
fixed 3030462 bug related to not finding features with square bracket…
Browse files Browse the repository at this point in the history
…s in their names
  • Loading branch information
lstein committed Nov 1, 2010
1 parent 4b71f4c commit 2473347
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
by calling renderer() method.
* Fixed regression in which database option wasn't propagating from base track to semantic
zoom tracks.
* Fixed SequenceDumper behavior on GFF dumping.
* Removed brackets from list of naughty search characters to fix bug 3030462

2.15 Mon Sep 13 11:22:40 EDT 2010
* Set the "DNA accessor" for databases to the default database. Assuming that the backend supports
Expand Down
15 changes: 8 additions & 7 deletions conf/plugins/SequenceDumper.pm
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ my @FORMATS = ( 'fasta' => ['Fasta', undef],
'raw' => ['Raw sequence', undef],
'game' => ['GAME (XML)', 'xml'],
'bsml' => ['BSML (XML)', 'xml'],
'gff' => ['GFF', undef],
'gff' => ['GFF3', undef],
);

# initialize @ORDER using the even-numbered elements of the array
Expand All @@ -91,7 +91,7 @@ unshift @ORDER,'gff';
my %FORMATS = @FORMATS;
my %LABELS = map { $_ => $FORMATS{$_}[0] } keys %FORMATS;

$VERSION = '0.12';
$VERSION = '0.13';

@ISA = qw(Bio::Graphics::Browser2::Plugin);

Expand Down Expand Up @@ -268,7 +268,7 @@ sub gff_dump {
print start_html($segment) if $html;

print h1($segment),start_pre() if $html;
print "##gff-version 2\n";
print "##gff-version 3\n";
print "##date $date\n";
print "##sequence-region ",join(' ',$segment->ref,$segment->start,$segment->stop),"\n";
print "##source gbrowse SequenceDumper\n";
Expand All @@ -278,11 +278,12 @@ sub gff_dump {
$segment->absolute(0);
my $iterator = $segment->get_seq_stream(-types => \@feature_types) or return;
while (my $f = $iterator->next_seq) {
print $f->gff_string,"\n";
for my $s ($f->sub_SeqFeature) {
print $s->gff_string,"\n";
}
eval{$f->version(3)};
my $s =$f->gff_string(1);
chomp($s);
print $s,"\n";
}

print end_pre() if $html;
print end_html() if $html;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Bio/Graphics/Browser2/Region.pm
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ sub search_db {
my $args = shift;
my ($features);
if (my $name = $args->{-search_term}) {
$name =~ tr/a-zA-Z0-9.'"_*?: ;+-\/\#//cd; # remove rude characters
$name =~ tr/a-zA-Z0-9.'"_*?: ;+-\/\#\[\]//cd; # remove rude characters
my ($ref,$start,$stop,$class,$id) = $self->parse_feature_name($name);
$features = $self->lookup_features($ref,$start,$stop,$class,$name,$id);
}
Expand Down
1 change: 0 additions & 1 deletion lib/Bio/Graphics/Browser2/RegionSearch.pm
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ sub init_databases {

my $source = $self->source;
my $labels = $track_labels || [$source->labels];
# my $labels = $track_labels || [$source->dbs];

my $renderfarm = $self->source->global_setting('renderfarm');

Expand Down

0 comments on commit 2473347

Please sign in to comment.