|
32 | 32 | this.drawingBoundary = {top: this.MARGIN, bottom: this.trackHeight - this.MARGIN} |
33 | 33 | this.windowRange = 0 |
34 | 34 | this.autoScale = false |
35 | | - this.averagePointAmount = 5 |
| 35 | + this.averagePointAmount = 10 |
36 | 36 | // this.dataPoints=[] |
37 | 37 | }, |
38 | 38 |
|
|
182 | 182 | this.track.data[vwindow.chr].dataPoints.push(dataEntry) |
183 | 183 | }, |
184 | 184 | averagePoints: function () { |
185 | | - var splitAmount = (this.averagePointAmount - 1) / 2 |
| 185 | + var splitAmount = Math.ceil((this.averagePointAmount - 1) / 2) |
186 | 186 | var vwindow = this.mainSvg.viewWindow |
187 | 187 | this.track.data[vwindow.chr].averageDataPoints = [] |
188 | | - for (var i = splitAmount; i < this.track.data[vwindow.chr].dataPoints.length - splitAmount; i++) { |
| 188 | + for (var i = splitAmount; i < this.track.data[vwindow.chr].dataPoints.length - splitAmount-1; i++) { |
189 | 189 | var temp = this.track.data[vwindow.chr].dataPoints[i] |
190 | 190 | var sum = 0 |
191 | 191 | for (var j = 0; j < this.averagePointAmount; j++) { |
|
234 | 234 | currPolygon.overflows = {exceedMax: [], exceedMin: []} |
235 | 235 | } |
236 | 236 | // then push the top two points |
237 | | - if (this.transformXCoordinate({chr: windowToDraw.chr, coor: end}) - |
238 | | - this.transformXCoordinate({chr: windowToDraw.chr, coor: start}) < 1) { |
| 237 | + if (/*this.transformXCoordinate({chr: windowToDraw.chr, coor: end}) - |
| 238 | + this.transformXCoordinate({chr: windowToDraw.chr, coor: start}) < 1*/true) { |
239 | 239 | // both are within one pixel |
240 | 240 | currPolygon.points.push( |
241 | 241 | this.transformXCoordinate({chr: windowToDraw.chr, coor: (start + end) / 2}, false) + |
|
0 commit comments