Skip to content
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

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

Closed
jiefoxi opened this issue Dec 1, 2011 · 5 comments
Closed

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

jiefoxi opened this issue Dec 1, 2011 · 5 comments

Comments

@jiefoxi
Copy link

jiefoxi commented Dec 1, 2011

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} ) {
@scottcain
Copy link
Member

Hi jiefoxi,

Can you provide some evidence that segment has an off by one? I'm wondering if perhaps you are not interpreting the graphical display the same way we are.

Thanks,
Scott

@jiefoxi
Copy link
Author

jiefoxi commented May 17, 2012

For example, when choosing a region "chr1:1..100", GBrowse shows "chr1: 99 bp from chr1:1..99".

@scottcain
Copy link
Member

Hmm, it doesn't do that for me:

Search term: ChrV:1..100

Result: 100 bp from ChrV:1..100

What version of GBrowse are you using? It would probably be better to take this to the GBrowse mailing list.

@jiefoxi
Copy link
Author

jiefoxi commented May 23, 2012

GBrowse 2.43

@scottcain
Copy link
Member

Since this can't be reproduced in the current release, I assume it was fixed somewhere along the way, so I'm closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants