Parse start and end as numbers in interact file #1670
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
I'm proposing a simple adjustment to the code for parsing interact file.
The first two indices describing region of the interaction pair were parsed as strings which caused problems when rendering interaction pairs arcs in some cases.
Based on what I've tracked down in my usecase:
dataRange.max
is used to computeyscale
(interactionTrack.js
file).max
defaulted to 0 even when viewing regions with defined interactions for some genomic positions, which caused theigv.js
to not drawproportional
arcs whilenested
arcs could be drawn. The behavior was further inconsistent as whether the arc was drawn was dependent on genomic position and zoom level.dataRange.max
, the feature list passed todoAutoscale
(interactionTrack.js
file) can be empty, since thebuildIntervalTree
(featureUtils.js
file) usesstart
andend
attributes of a feature, which are strings in this case (and e.g.featureList
is then sorted lexicographically).Based on my test build the proposed pull request fixes this issue.
The build-in tests also finished without relevant error (apart for
HicFile remote file read header
test, which appears to be unrelated)