higlass: SVG API export problems

Commit:

  • Master branch of higlass
  • Compiled version of Danielle’s higlass-multivec
  • Compiled version of master branch of higlass-website
  • Master branch of higlass-server

Steps to reproduce

  1. Initialize higlass container
  2. Use zoomTo() API call to relocate view to genomic position
  3. Use exportAsSvg() API call to export SVG

I have experimented with using setTimeout() to delay the execution of exportAsSvg() until after zoomTo() is given time to complete rendering (between 0-5 seconds), but the SVG output has the same render issues.

Observed behavior

  1. Chromosome track includes position labels from initial viewconf genomic position, as well as the position labels from to the post-zoomTo() call
  2. Track label components are not positioned correctly (specifically, the data resolution labels are left-aligned in the web view, but are centered in the SVG view)

Example SVG file is available here: https://gist.github.com/alexpreynolds/743af70631575bf1ecbad425e5034d13

In this example, the browser is initialized to a position on chrX and a zoomTo() call moves the browser to a position on chr3. The chromosome track contains labels from both chromosomes.

The SVG output should look similar to this:

test

However, this is the observed output (converted to PNG):

test2

Expected behavior

  • Track content should match the post-zoomTo() genomic position shown in the source web container
  • Track label components should match alignment and position of components in web container

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 18 (8 by maintainers)

Commits related to this issue

Most upvoted comments

One of the more satisfying issues to close 😃