diff --git a/dev/misc/igv-paper.html b/dev/misc/igv-paper.html
new file mode 100644
index 000000000..481ab48e7
--- /dev/null
+++ b/dev/misc/igv-paper.html
@@ -0,0 +1,103 @@
+
+
+
+ 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 41f397d5e..219c17fd8 100644
--- a/js/feature/featureParser.js
+++ b/js/feature/featureParser.js
@@ -94,8 +94,7 @@ class FeatureParser {
let line
while ((line = await dataWrapper.nextLine()) !== undefined) {
if (line.startsWith("track") || line.startsWith("#track")) {
- let h = parseTrackLine(line)
- Object.assign(header, h)
+ header.trackLineProperties = parseTrackLine(line)
} 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 ab7c291c0..de03bd9b3 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.setTrackProperties(this.header)
+ if (this.header && this.header.trackLineProperties) {
+ this.setTrackProperties(this.header.trackLineProperties)
}
if (this.visibilityWindow === undefined && typeof this.featureSource.defaultVisibilityWindow === 'function') {
diff --git a/js/feature/interactionTrack.js b/js/feature/interactionTrack.js
index 7eae3e238..4b9d05ee1 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.setTrackProperties(this.header)
+ if (this.header && this.header.trackLineProperties) {
+ this.setTrackProperties(this.header.trackLineProperties)
}
if (this.visibilityWindow === undefined && typeof this.featureSource.defaultVisibilityWindow === 'function') {
diff --git a/js/feature/segTrack.js b/js/feature/segTrack.js
index f4949dbee..0ef911267 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.setTrackProperties(this.header)
+ if (this.header && this.header.trackLineProperties) {
+ this.setTrackProperties(this.header.trackLineProperties)
}
}
diff --git a/js/feature/spliceJunctionTrack.js b/js/feature/spliceJunctionTrack.js
index bc0c2a6c3..f03cbf57e 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.setTrackProperties(this.header)
+ if (this.header && this.header.trackLineProperties) {
+ this.setTrackProperties(this.header.trackLineProperties)
}
if (this.visibilityWindow === undefined && typeof this.featureSource.defaultVisibilityWindow === 'function') {
diff --git a/js/feature/wigTrack.js b/js/feature/wigTrack.js
index f5356b13e..ac2a0acd8 100755
--- a/js/feature/wigTrack.js
+++ b/js/feature/wigTrack.js
@@ -73,7 +73,9 @@ class WigTrack extends TrackBase {
async postInit() {
const header = await this.getHeader()
- if (header) this.setTrackProperties(header)
+ if (header && header.trackLineProperties) {
+ this.setTrackProperties(header.trackLineProperties)
+ }
}
async getFeatures(chr, start, end, bpPerPixel) {
diff --git a/js/gcnv/gcnvTrack.js b/js/gcnv/gcnvTrack.js
index 40da3d511..7626cbf7e 100755
--- a/js/gcnv/gcnvTrack.js
+++ b/js/gcnv/gcnvTrack.js
@@ -49,8 +49,9 @@ class GCNVTrack extends TrackBase {
this.sampleNames = this.header.columnNames.slice(3)
// Set generic properties from track line
- this.setTrackProperties(this.header) // setTrackProperties defined in TrackBase
-
+ if (this.header && this.header.trackLineProperties) {
+ this.setTrackProperties(this.header.trackLineProperties)
+ }
// 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 f28b248bb..fb5b64239 100644
--- a/js/gwas/gwasTrack.js
+++ b/js/gwas/gwasTrack.js
@@ -79,21 +79,21 @@ class GWASTrack extends TrackBase {
}
// Set properties from track line
- if (this.header) {
- this.setTrackProperties(this.header)
+ if (this.header && this.header.trackLineProperties) {
+ this.setTrackProperties(this.header.trackLineProperties)
}
// Set initial range if specfied, unless autoscale == true
if (!this.autoscale) {
if (this.posteriorProbability) {
this.dataRange = {
- min: this.config.min === undefined ? 0 : config.min,
- max: this.config.max === undefined ? 1 : config.max
+ min: this.config.min === undefined ? 0 : this.config.min,
+ max: this.config.max === undefined ? 1 : this.config.max
}
} else {
this.dataRange = {
- min: this.config.min === undefined ? 0 : config.min,
- max: this.config.max === undefined ? 25 : config.max
+ min: this.config.min === undefined ? 0 : this.config.min,
+ max: this.config.max === undefined ? 25 : this.config.max
}
}
}