cytoscape / cyREST

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

Visual Mappings don't update on first try #26

Closed dotasek closed 7 years ago

dotasek commented 7 years ago

Via @AlexanderPico:

Very odd behavior. In order to get a new visual mapping to stick, I have to run the PUT method twice. See wrapper function:

https://github.com/cytoscape/cytoscape-automation/blob/master/for-scripters/R/r2cytoscape/R/updateStyleMapping.R#L37

When you run this PUT once, you get no effect or some "odd" effect (like clearing a style mapping), then the second application fixes it. I think you can continue to get this effect with every even application fixing the effect of odd applications. WEIRD.

Behavior is confirmed and definitely weird. To replicate, load galFiltered.cys, switch to the Metallic style, the start making a POST requests to /v1/styles/Metallic/mappings with JSON like the following:

[{

    "mappingType": "passthrough",
    "mappingColumn": "COMMON",
    "mappingColumnType": "String",
    "visualProperty": "NODE_LABEL"

}]

Change the mappingColumn field between calls; sometimes the mapping is recognized, other times it is not applied, or disappears altogether.

dotasek commented 7 years ago

Addressed in 7a8a369