PathwayCommons / pathways-search

A web app to search pathways in Pathway Commons
http://www.pathwaycommons.org/pathways/
MIT License
2 stars 4 forks source link

Pathway Image empty #38

Closed jvwong closed 7 years ago

jvwong commented 7 years ago

Breaking case: http://mj3cheun.github.io/pathways-search.html#/pathway?uri=http%3A%2F%2Fidentifiers.org%2Freactome%2FR-HSA-69541

The downloaded file is empty.

mj3cheun commented 7 years ago

I assume you are talking about the PNG download? I am aware of this. For some reason, if you pass in the full pathway option, cytoscapejs throws an error resulting in an empty file for some pathways. Interestingly enough, the screenshot button still functions fine. Of course I have been unable to prove it, but I have found that NCI pathways have this problem but other datasources don't. I am doing investigating for the moment.

jvwong commented 7 years ago

I also see this for (Reactome) 'Signaling by BMP'

mj3cheun commented 7 years ago

Ok good to know. So far I have seen the problem with several NCI pathways but haven't seen it with a couple INOH pathways. Trying to find common threads between all the broken pathways.

mj3cheun commented 7 years ago

@d2fong Error message and example of a pathway that has this problem screen shot 2017-03-31 at 3 28 34 pm

mj3cheun commented 7 years ago

Dylan recently changed SBGN-renderer, when beta is back up test to see if it fixed the problem.

d2fong commented 7 years ago

I doubt any of the recent changes I made fixed this problem.

d2fong commented 7 years ago

@maxkfranz https://github.com/cytoscape/cytoscape.js/blob/unstable/src/extensions/renderer/canvas/export-image.js#L15

This function seems to have thrown a NS_ERROR_FAILURE error when exporting one of the pathways to an image in Manfred's app.

maxkfranz commented 7 years ago

Each browser has a max file size limit. If it's too large, you have to use a smaller file (jpg or lower dpi).

mj3cheun commented 7 years ago

Ok thanks Max, that solved the problem.

Fixed in commit 4733dbad33c1cdd7e9b4cf796a5fc87208a7849e. Dropped scaling from 10 -> 5, which should be enough overhead for most reasonable pathways. Will drop it lower if size becomes an issue again.

maxkfranz commented 7 years ago

See https://github.com/cytoscape/cytoscape.js/issues/1775