Skip to content

Commit

Permalink
fix off-by-one error in bioperl flattener. fixes #73.
Browse files Browse the repository at this point in the history
@skinner, that looks to me like some attempt to deal with UCSC
coordinates.  does something someplace else need to be fixed because
of that?
  • Loading branch information
rbuels committed Feb 29, 2012
1 parent 71bf1a0 commit bb8ba75
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/BioperlFlattener.pm
Expand Up @@ -32,9 +32,9 @@ use NameHandler;
#for every feature, which would take up too much space/bandwidth)
#@featMap maps from feature objects to arrays
my @featMap = (
sub {$_[0]->start - 1},
sub {int($_[0]->end)},
sub {int($_[0]->strand)},
sub {int $_[0]->start },
sub {int $_[0]->end },
sub {int $_[0]->strand},
sub {$_[0]->source_tag},
);

Expand Down

5 comments on commit bb8ba75

@skinner
Copy link
Member

@skinner skinner commented on bb8ba75 Mar 7, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoa, the JBrowse code all assumes that coordinates are zero-based, half-open, like Chado. Which is The Right Way to do it (I'll follow up via email with the full essay for why that is). This is not an off-by-one error, this is exactly as intended. The way to fix #73 is for user-visible display messages to have code that does a " + 1" in them. That's the way UCSC does it; the code is all zero-based, half-open internally, and displays to users add one to the numbers.

@rbuels
Copy link
Collaborator Author

@rbuels rbuels commented on bb8ba75 Mar 7, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, somebody already pointed that out on the gmod-ajax list, this was later reverted.

You don't have to write an essay on why that's the Right Way, I agree that interbase coordinates are the best internal representation.

@rbuels
Copy link
Collaborator Author

@rbuels rbuels commented on bb8ba75 Mar 7, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gmod-ajax thread was "setting up jbrowse with a bacterial reference genome"

@rbuels
Copy link
Collaborator Author

@rbuels rbuels commented on bb8ba75 Mar 7, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

related issues are #73 and #74

@skinner
Copy link
Member

@skinner skinner commented on bb8ba75 Mar 7, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thanks, next time I'm catching up on my notifications I'll try and read everything before commenting.

Please sign in to comment.