cytoscape / cyREST

Core App: REST API module for Cytoscape
https://github.com/cytoscape/cyREST/wiki
MIT License
30 stars 13 forks source link

Error in Curl when mapping Node Color #94

Closed josegarciamanteiga closed 5 years ago

josegarciamanteiga commented 5 years ago

Hi, Everything works fine up to trying to set the color node by mapping. RCy3:::setNodeColorMapping('cluster', c("cluster1","cluster2","cluster3","cluster4","cluster5"), c('#F5EDDD', '#F59777', '#F55333','#C0C0C0','#808080')) Error in curl::curl_fetch_memory(url, handle = handle) : Unrecognized content encoding type. libcurl understands deflate, gzip content encodings.

The ping, version and other checks are OK Thanks

AlexanderPico commented 5 years ago

Hi. Looks like you are attempting a "discrete" mapping, where you specify a 1:1 mapping between values and colors. The default 'mapping.type' however is "continuous". So, you just need to include that arg like so (see the 'd' at the very end):

RCy3:::setNodeColorMapping('cluster', c("cluster1","cluster2","cluster3","cluster4","cluster5"), c('#F5EDDD', '#F59777', '#F55333','#C0C0C0','#808080'), 'd')

If this doesn't work, please file an issue with RCy3 (https://github.com/cytoscape/RCy3/issues) and include a sample dataset (e.g., a CYS file) that I can work with. Thanks!