wikipathways/cytoscape-wikipathways-app

can't open GPML files from file system

AdamStuart opened this issue · 9 comments

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)

Example GPML file (remove .txt after downloading):

WP254_96952.gpml.txt

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

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)

@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.

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

changed "filename" argument to "file"

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

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.