From cce91151cb68d9989d2108a1437e102c9853f954 Mon Sep 17 00:00:00 2001
From: jrobinso
Date: Tue, 14 Dec 2021 15:06:10 -0800
Subject: [PATCH] Revert "trackline logic bug -- all header lines were treated
as a track line, not just likes beginning with "track""
This reverts commit fddefa7520f9c2919873c43ff783a56c53b397d0.
---
dev/misc/igv-paper.html | 103 ------------------------------
js/feature/featureParser.js | 3 +-
js/feature/featureTrack.js | 4 +-
js/feature/interactionTrack.js | 4 +-
js/feature/segTrack.js | 4 +-
js/feature/spliceJunctionTrack.js | 4 +-
js/feature/wigTrack.js | 4 +-
js/gcnv/gcnvTrack.js | 5 +-
js/gwas/gwasTrack.js | 4 +-
9 files changed, 15 insertions(+), 120 deletions(-)
delete mode 100644 dev/misc/igv-paper.html
diff --git a/dev/misc/igv-paper.html b/dev/misc/igv-paper.html
deleted file mode 100644
index 481ab48e7..000000000
--- a/dev/misc/igv-paper.html
+++ /dev/null
@@ -1,103 +0,0 @@
-
-
-
- Title
-
-
-
-Test for igv.js paper figures
-
-igv.js paper
-
-Figure panels are produced below from this build of igv.js. To see figures in igv.org/app-test
-
- - Click the tinyurl
- - Change the host from "igv.org/app" to "igv.org/app-test"
-
-
-Tiny URLs from paper:
-
-
-Current igv.js
-
-
-
Panel A
-
-
-
-
-
Panel B
-
-
-
-
-
Panel C
-
-
-
-
-
Panel D
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/js/feature/featureParser.js b/js/feature/featureParser.js
index 219c17fd8..41f397d5e 100644
--- a/js/feature/featureParser.js
+++ b/js/feature/featureParser.js
@@ -94,7 +94,8 @@ class FeatureParser {
let line
while ((line = await dataWrapper.nextLine()) !== undefined) {
if (line.startsWith("track") || line.startsWith("#track")) {
- header.trackLineProperties = parseTrackLine(line)
+ let h = parseTrackLine(line)
+ Object.assign(header, h)
} else if (line.startsWith("browser")) {
// UCSC line, currently ignored
} else if (line.startsWith("#columns")) {
diff --git a/js/feature/featureTrack.js b/js/feature/featureTrack.js
index de03bd9b3..ab7c291c0 100755
--- a/js/feature/featureTrack.js
+++ b/js/feature/featureTrack.js
@@ -117,8 +117,8 @@ class FeatureTrack extends TrackBase {
}
// Set properties from track line
- if (this.header && this.header.trackLineProperties) {
- this.setTrackProperties(this.header.trackLineProperties)
+ if (this.header) {
+ this.setTrackProperties(this.header)
}
if (this.visibilityWindow === undefined && typeof this.featureSource.defaultVisibilityWindow === 'function') {
diff --git a/js/feature/interactionTrack.js b/js/feature/interactionTrack.js
index 4b9d05ee1..7eae3e238 100644
--- a/js/feature/interactionTrack.js
+++ b/js/feature/interactionTrack.js
@@ -87,8 +87,8 @@ class InteractionTrack extends TrackBase {
}
// Set properties from track line
- if (this.header && this.header.trackLineProperties) {
- this.setTrackProperties(this.header.trackLineProperties)
+ if (this.header) {
+ this.setTrackProperties(this.header)
}
if (this.visibilityWindow === undefined && typeof this.featureSource.defaultVisibilityWindow === 'function') {
diff --git a/js/feature/segTrack.js b/js/feature/segTrack.js
index 0ef911267..f4949dbee 100755
--- a/js/feature/segTrack.js
+++ b/js/feature/segTrack.js
@@ -107,8 +107,8 @@ class SegTrack extends TrackBase {
this.header = await this.featureSource.getHeader()
}
// Set properties from track line
- if (this.header && this.header.trackLineProperties) {
- this.setTrackProperties(this.header.trackLineProperties)
+ if (this.header) {
+ this.setTrackProperties(this.header)
}
}
diff --git a/js/feature/spliceJunctionTrack.js b/js/feature/spliceJunctionTrack.js
index f03cbf57e..bc0c2a6c3 100755
--- a/js/feature/spliceJunctionTrack.js
+++ b/js/feature/spliceJunctionTrack.js
@@ -82,8 +82,8 @@ class SpliceJunctionTrack extends TrackBase {
}
// Set properties from track line
- if (this.header && this.header.trackLineProperties) {
- this.setTrackProperties(this.header.trackLineProperties)
+ if (this.header) {
+ this.setTrackProperties(this.header)
}
if (this.visibilityWindow === undefined && typeof this.featureSource.defaultVisibilityWindow === 'function') {
diff --git a/js/feature/wigTrack.js b/js/feature/wigTrack.js
index ac2a0acd8..f5356b13e 100755
--- a/js/feature/wigTrack.js
+++ b/js/feature/wigTrack.js
@@ -73,9 +73,7 @@ class WigTrack extends TrackBase {
async postInit() {
const header = await this.getHeader()
- if (header && header.trackLineProperties) {
- this.setTrackProperties(header.trackLineProperties)
- }
+ if (header) this.setTrackProperties(header)
}
async getFeatures(chr, start, end, bpPerPixel) {
diff --git a/js/gcnv/gcnvTrack.js b/js/gcnv/gcnvTrack.js
index 7626cbf7e..40da3d511 100755
--- a/js/gcnv/gcnvTrack.js
+++ b/js/gcnv/gcnvTrack.js
@@ -49,9 +49,8 @@ class GCNVTrack extends TrackBase {
this.sampleNames = this.header.columnNames.slice(3)
// Set generic properties from track line
- if (this.header && this.header.trackLineProperties) {
- this.setTrackProperties(this.header.trackLineProperties)
- }
+ this.setTrackProperties(this.header) // setTrackProperties defined in TrackBase
+
// set option to highlight sample track line on click
if (this.header.hasOwnProperty("clickToHighlight")) {
let colour = this.header["clickToHighlight"]
diff --git a/js/gwas/gwasTrack.js b/js/gwas/gwasTrack.js
index fb5b64239..716ecf89c 100644
--- a/js/gwas/gwasTrack.js
+++ b/js/gwas/gwasTrack.js
@@ -79,8 +79,8 @@ class GWASTrack extends TrackBase {
}
// Set properties from track line
- if (this.header && this.header.trackLineProperties) {
- this.setTrackProperties(this.header.trackLineProperties)
+ if (this.header) {
+ this.setTrackProperties(this.header) // setTrackProperties defined in TrackBase
}
// Set initial range if specfied, unless autoscale == true