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

[Pathway Issue]: WP3965, WP4010, WP430, WP4659, WP5186, WP5192, WP5461, WP5489 #134

Open
2 of 7 tasks
lorenzocasbarra opened this issue Sep 18, 2024 · 3 comments
Open
2 of 7 tasks
Assignees
Labels
question Further information is requested

Comments

@lorenzocasbarra
Copy link

lorenzocasbarra commented Sep 18, 2024

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:

 https://webservice.wikipathways.org/getPathwayAs?fileType=svg&pwId={pwId}&format=dump

They instead produce an empty dump.

Also, downloading the svg from this link from the classic site results in an empty file as well:

   https://classic.wikipathways.org//wpi/wpi.php?action=downloadFile&type=svg&pwTitle=Pathway:{pwId}&oldid=135480

The only way that works is by using the following link from the new site:

   https://www.wikipathways.org/wikipathways-assets/pathways/pwId/pwId.svg

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?

  • Missing content
  • Incorrect content
  • Duplicated content
  • Other

Type of revision

  • Major
  • Minor
  • Deletion
@lorenzocasbarra lorenzocasbarra added the curation Issues related to pathway curation label Sep 18, 2024
@AlexanderPico
Copy link
Member

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"?

@lorenzocasbarra
Copy link
Author

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.

@AlexanderPico
Copy link
Member

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?

@AlexanderPico AlexanderPico self-assigned this Sep 19, 2024
@AlexanderPico AlexanderPico added question Further information is requested and removed curation Issues related to pathway curation labels Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants