GMOD/GBrowse — Issue #11: The length of segment is 1 bp less then the true value
Author: jiefoxi
Created: 2011-12-01 06:17:57+00:00
State: open

The length of segment is 1 bp less then the true value

Here is a patch to fix it:

lib/Bio/Graphics/Browser2/Render.pm | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/Bio/Graphics/Browser2/Render.pm b/lib/Bio/Graphics/Browser2/Render.pm
index 0cc268d..3d6d701 100644
--- a/lib/Bio/Graphics/Browser2/Render.pm
+++ b/lib/Bio/Graphics/Browser2/Render.pm
@@ -878,7 +878,7 @@ sub generate_title {
: @$features == 0 ? $self->translate('NOT_FOUND',$state->{name})
: @$features == 1 ? "$description: ".
$self->translate('SHOWING_FROM_TO',
-	scalar $dsn->unit_label($state->{view_stop} - $state->{view_start}),
+	scalar $dsn->unit_label($state->{view_stop} - $state->{view_start} + 1),
$state->{ref},
$dsn->commas($state->{view_start}),
$dsn->commas($state->{view_stop}))
@@ -921,7 +921,7 @@ sub segment_info_object {
flip => $state->{flip},
initial_view_start => $state->{view_start},
initial_view_stop => $state->{view_stop},
- length_label => scalar $self->data_source->unit_label($state->{view_stop} - $state->{view_start}),
+ length_label => scalar $self->data_source->unit_label($state->{view_stop} - $state->{view_start} + 1),
description => $self->data_source->description,
);
if ( $state->{region_size} ) {