Skip to content

Commit

Permalink
Accounted for y coordinates being 0 based in wigtrack
Browse files Browse the repository at this point in the history
  • Loading branch information
milandomazet committed Aug 9, 2024
1 parent 25c83c2 commit 557f5fe
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions js/feature/wigTrack.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,10 @@ class WigTrack extends TrackBase {
const bpPerPixel = options.bpPerPixel
const bpStart = options.bpStart
const pixelWidth = options.pixelWidth
const pixelHeight = options.pixelHeight
const pixelHeight = options.pixelHeight - 1
const bpEnd = bpStart + pixelWidth * bpPerPixel + 1
const posColor = this.color || DEFAULT_COLOR

let lastNegValue = 1
const scaleFactor = this.getScaleFactor(this.dataRange.min, this.dataRange.max, options.pixelHeight, this.logScale)

const scaleFactor = this.getScaleFactor(this.dataRange.min, this.dataRange.max, pixelHeight, this.logScale)
const yScale = (yValue) => this.logScale
? this.computeYPixelValueInLogScale(yValue, scaleFactor)
: this.computeYPixelValue(yValue, scaleFactor)
Expand Down

0 comments on commit 557f5fe

Please sign in to comment.