cytoscape / RCy3

New version of RCy3, redesigned and collaboratively maintained by Cytoscape developer community
MIT License
49 stars 20 forks source link

Exporting with non-ASCII filepaths #54

Closed ariutta closed 5 years ago

ariutta commented 5 years ago

Export to CX via RCy3. Try opening that same file with the same filepath using rjson's fromJSON. You'll get an error for non-ASCII filepaths, e.g., any incl/ characters like Greek alpha: α such as for WikiPathways WP4566.

filename <- "WP4566__Translational_regulation_by_PDGFRα__Homo_sapiens"
filepath_san_ext <- file.path(filename)
filepathCx <- paste0(filepath_san_ext, '.cx')
cx <- fromJSON(file=filepathCx)

Here's an example of where this is an issue: https://github.com/wikipathways/wikipathways2ndex/blob/8b9c7282783a90a286d6c20d4c1cecedee72023e/wikipathways2cx.R#L49

How would we like to handle this behavior?

AlexanderPico commented 5 years ago

Fixed title. It was wrong anyways. Pathway titles shouldn't have non-ASCII characters.

For your script, you can assume this or simply strip/replace them when constructing the filenames.