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

SVG export not well formed #62

Closed
jrhawley opened this issue Jun 2, 2020 · 3 comments
Closed

SVG export not well formed #62

jrhawley opened this issue Jun 2, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@jrhawley
Copy link

jrhawley commented Jun 2, 2020

Hi developers,

While creating various displays, I've tried exporting them into SVGs and PNGs using the Gear icon > Export views as ... options.
Exporting as an SVG doesn't produce any errors from HiGlass, but when I go to open the file in an external SVG viewer like Firefox, it shows an "XML Parsing Error: not well-formed" error and doesn't load properly.

Opening the SVG file to the appropriate spot, Firefox highlights the following as improperly formed:

<image xlink:href="data:image/png;base64,iVBOl...AAAAAASUVORK5CYII="undefinedxmlns:xlink="http://www.w3.org/1999/xlink" width="256" height="256" />
--------------------------------------------------------------------^

From what I've found of other SVG/html files, I'm wondering if that attribute should be written as ...K5CYII=" alt="undefined" xmlns:xlink="... or something similar in your exporting function.
This might be an issue with a package you're using and not something any of the HiGlass components controls directly, I'm not sure.
I'm also not sure if this is related to the other issues you've had with exporting images, like in #57.

It's obviously not an urgent priority, but exporting the views for manipulation in picture editing software is something I've been trying to do, and I'm sure would be helpful for others, as well.
Thanks

@flekschas
Copy link
Member

Sorry for the belated response.

Quick question, when did you install higlass-python? We had issues with incorrectly formatted SVGs some time ago in hglib (the actual higlass plotting library) but I thought we fixed the issue. Maybe all it needs is to update higlass-python to get the latest version of higlass.

WARNING But please wait updating until #64 is merged.

The reason I am asking is because I tested the SVG export via Export views as SVG and it works fine when running the PR.

@flekschas flekschas added the bug Something isn't working label Jun 30, 2020
@jrhawley
Copy link
Author

jrhawley commented Jul 6, 2020

I had installed higlass-python back in January (v0.4.0) when it gave me the error. I just updated to v0.4.1 and tried it out and the issue seems to be fixed. I'm not totally sure if I had an old hglib installed or something like that, but since it's working now I can close this issue.

Thanks for the response

@jrhawley jrhawley closed this as completed Jul 6, 2020
@flekschas
Copy link
Member

Glad to hear it's working!

FYI, when you install jupyter labextension install higlass-jupyter it will take the latest version of higlass.js. But after the widget is installed higlass.js doesn't get updated until you reinstall higlass-jupyter. Since we published higlass-python v0.4 quite a few new versions of higlass.js were published, which probably fixed the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants