diff --git a/release-notes.txt b/release-notes.txt index d9b6c197c0..39bffdede3 100644 --- a/release-notes.txt +++ b/release-notes.txt @@ -56,6 +56,10 @@ * Fixed a security issue with JBrowse error messages. Thanks to @GrainGenes for noticing and reporting it! (issue #602, @rbuels) + * Fixed an off-by-one error in the "Next segment position" field of BAM features. + Thanks to @keiranmraine for reporting it, and @rdhayes for tracking down the fix! + (issue #907, pull #986, @rdhayes) + * Fixed the broken demo track data source in the modENCODE sample data. Thanks to @cmdcolin for the fix! (pull #999, @cmdcolin) diff --git a/src/JBrowse/Store/SeqFeature/BAM/LazyFeature.js b/src/JBrowse/Store/SeqFeature/BAM/LazyFeature.js index 3c98f748a9..19d19f2f16 100644 --- a/src/JBrowse/Store/SeqFeature/BAM/LazyFeature.js +++ b/src/JBrowse/Store/SeqFeature/BAM/LazyFeature.js @@ -208,9 +208,11 @@ var Feature = Util.fastDeclare( return cigar; }, next_segment_position: function() { + // NOTE: next_segment_position is a JBrowse location string, so + // it is in 1-based coordinates. Thus, we add 1 to the position. var nextSegment = this.file.indexToChr[this._get('_next_refid')]; if( nextSegment ) - return nextSegment.name+':'+this._get('_next_pos'); + return nextSegment.name+':'+(parseInt(this._get('_next_pos'))+1); else return undefined; },