wikipathways / cytoscape-wikipathways-app

WikiPathways app for Cytoscape to open and access pathways from WikiPathways
Apache License 2.0
5 stars 7 forks source link

can't open GPML files from file system #83

Closed AdamStuart closed 4 years ago

AdamStuart commented 6 years ago

java.lang.ClassCastException: org.wikipathways.cytoscapeapp.internal.io.GpmlCyReaderTask cannot be cast to org.cytoscape.io.read.CyNetworkReader at org.cytoscape.io.internal.read.CyNetworkReaderManagerImpl.getReader(CyNetworkReaderManagerImpl.java:34) ~[?:?] at org.cytoscape.task.internal.export.network.LoadNetworkFileTask.run(LoadNetworkFileTask.java:64)

AlexanderPico commented 5 years ago

screen shot 2018-12-14 at 1 18 50 pm

AlexanderPico commented 5 years ago

Example GPML file (remove .txt after downloading):

WP254_96952.gpml.txt

fehrhart commented 5 years ago

Error still present. We solved it by using an older version of WP addon but would be great to have that fixed soon!

AlexanderPico commented 5 years ago

Reminder: the primary use case for opening local GPML files is via automation (re: Anders). Here are the currently available commands:

  wikipathways import-as-network  Import a GPML object from WikiPathways and translate it into a network   wikipathways import-as-pathway  Import a GPML object from WikiPathways and translate it into a pathway diagram   wikipathways import-file-as-network  Import a GPML file from a file path translate it into a network   wikipathways import-file-as-pathway  Import a GPML file from a file path and translate it into a pathway diagram

The last two have an id arg (which should probably be renamed file). So, an example command that should work would be (given the attached GPML file on your Desktop):

wikipathways import-file-as-pathway file="~/Desktop/WP179_103430.gpml"

WP179_103430.gpml.txt (remove ".txt" after downloading; required for attachments)

AlexanderPico commented 5 years ago

@AdamStuart Since the current issues seem to be with the file chooser, can you try getting the automation approach working (see previous comment)? That would be immediately useful whether the GUI worked or not. And at least drag-n-drop is a workaround for the GUI.

AdamStuart commented 5 years ago

Drag and drop works thru the GpmlFileReaderTaskFactory Commands (that read files) work thru FileImportCmdTaskFactory. Not able to register the former as a command

AdamStuart commented 5 years ago

changed "filename" argument to "file"

AdamStuart commented 5 years ago

working in 3.3.8 via the file chooser and File >> Import >> Network from File... (Cmd-L)

ahrweber commented 5 years ago

I installed 3.3.8 in Cytoscape and tried to import a local network. Unfortunately the import stops with Exception "No such file or directory". Same error on Windows and Linux using the automation and the file picking menu.