Open lorenzocasbarra opened 2 months ago
Indeed, going to wikipathways-assets is the correct approach. We will be updating our webservices soon to do just that. Those SVGs are the highest quality and most accurate.
Can you explain what you mean by "resolution not compatible with the coordinates"?
Let's take for example WP3965, the svg file content starts with this:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="wp3965-svg" version="1.1" baseProfile="full" preserveAspectRatio="xMidYMid" color="black" class="Diagram" viewBox="0 0 934.4175754285591 855.4245593186471" width="800px" height="600px" vocab="http://vocabularies.wikipathways.org/wp#">
The issue, for me, is that the viewBox has a given height and width, which are different from the ones stated using the width and height tags. This results in an image with visible alpha channels, and once that occurs the centerX and centerY coordinates contained in the .gpml file can no longer be used to point where a component (gene, metabolite etc..) is located on the image.
A simple fix that is working for me at this stage is to remove the width and height tags from the svg downloaded from wikipathway-assets:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="wp3965-svg" version="1.1" baseProfile="full" preserveAspectRatio="xMidYMid" color="black" class="Diagram" viewBox="0 0 934.4175754285591 855.4245593186471" vocab="http://vocabularies.wikipathways.org/wp#">
This results in the image having the dimensions stated by the viewBox tag and the centerX and centerY coordinates of each component from the .gpml file to be mapped correctly on it.
Interesting. Our approach was to populate the SVG with all the information one would need from the GPML, including ID mappings. This way, the SVG can be used independently from the GPML is a variety of use cases.
I hadn't considered a use case where you'd want to reference the location of genes from the GPML in the SVG... Curious why you need to do this?
What is the issue with the pathway?
Pathways WP3965, WP4010, WP430, WP4659, WP5186, WP5192, WP5461, WP5489 don't provide correct svg files using the following:
They instead produce an empty dump.
Also, downloading the svg from this link from the classic site results in an empty file as well:
The only way that works is by using the following link from the new site:
But it provides an svg with a resolution not compatible with the coordinates listed in the .gpml file (this is an issue for all the pathways at this stage, not only the ones listed above)
What kind of content issue is this?
Type of revision