Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse start and end as numbers in interact file #1670

Merged
merged 1 commit into from
Aug 13, 2023

Conversation

SchwarzMarek
Copy link
Contributor

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:

  • when arc type is proportional, the dataRange.max is used to compute yscale (interactionTrack.js file).
  • The max defaulted to 0 even when viewing regions with defined interactions for some genomic positions, which caused the igv.js to not draw proportional arcs while nested arcs could be drawn. The behavior was further inconsistent as whether the arc was drawn was dependent on genomic position and zoom level.
  • The underlying reason for this is that when computing the dataRange.max, the feature list passed to doAutoscale (interactionTrack.js file) can be empty, since the buildIntervalTree (featureUtils.js file) uses start and end 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)

@jrobinso
Copy link
Contributor

Yes clearly that is a bug, thanks for the diagnosis.

@jrobinso jrobinso merged commit b83f9ab into igvteam:master Aug 13, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants