Skip to content

Commit

Permalink
Revert "trackline logic bug -- all header lines were treated as a tra…
Browse files Browse the repository at this point in the history
…ck line, not just likes beginning with "track""

This reverts commit fddefa7.
  • Loading branch information
jrobinso committed Dec 14, 2021
1 parent fddefa7 commit cce9115
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 120 deletions.
103 changes: 0 additions & 103 deletions dev/misc/igv-paper.html

This file was deleted.

3 changes: 2 additions & 1 deletion js/feature/featureParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down
4 changes: 2 additions & 2 deletions js/feature/featureTrack.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down
4 changes: 2 additions & 2 deletions js/feature/interactionTrack.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down
4 changes: 2 additions & 2 deletions js/feature/segTrack.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down
4 changes: 2 additions & 2 deletions js/feature/spliceJunctionTrack.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down
4 changes: 1 addition & 3 deletions js/feature/wigTrack.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 2 additions & 3 deletions js/gcnv/gcnvTrack.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
4 changes: 2 additions & 2 deletions js/gwas/gwasTrack.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cce9115

Please sign in to comment.