Skip to content

Commit ee1ffca

Browse files
committed
Aggregation of Data via zoom
1 parent 99ff688 commit ee1ffca

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ services:
2424

2525
redis:
2626
image: "redis:alpine"
27-
restart: always
2827
volumes:
2928
- type: bind
3029
source: ${REDIS_DATA_PATH}

src/components/Result/GoslingViz.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,16 @@ function GoslingGenomeViz({ dataKey, showPlot, filter }) {
106106
}
107107

108108
const createTSSTrack = (data, aggregatedTSS, binSizes, strand, maxGenome, title = null) => {
109-
let sizesBins = Object.keys(binSizes).map((size, i) => { return { "GT": size * 10, "LT": (i === Object.keys(binSizes).length - 1) ? maxGenome * 1.1 : size * 40, size: parseInt(size), maxValueBin: binSizes[size] } })
110-
console.log(sizesBins)
109+
const TSS_DETAIL_LEVEL_ZOOM = 57500;
110+
let sizesBins = Object.keys(binSizes).sort((a, b) => parseInt(a) - parseInt(b)).map((size, i, arr) => {
111+
return {
112+
"GT": i === 0 ? TSS_DETAIL_LEVEL_ZOOM : arr[i - 1] * 40,
113+
"LT": (i === Object.keys(binSizes).length - 1) ? maxGenome * 1.1 : size * 40,
114+
size: parseInt(size), maxValueBin: binSizes[size]
115+
}
116+
})
111117
let binnedViews = sizesBins.map(({ GT, LT, size, maxValueBin }) => {
112-
let transitionPadding = 25000;
118+
let transitionPadding = 5000;
113119
return {
114120
"data": {
115121
"values": aggregatedTSS[size].filter(d => filter.includes(d["typeTSS"])),
@@ -200,7 +206,7 @@ function GoslingGenomeViz({ dataKey, showPlot, filter }) {
200206
{
201207
"operation": "LT",
202208
"measure": "zoomLevel",
203-
"threshold": 57500,
209+
"threshold": TSS_DETAIL_LEVEL_ZOOM,
204210
"transitionPadding": 0,
205211
"target": "track"
206212
}

0 commit comments

Comments
 (0)