cytoscape / RCy3

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

Missing style functions #49

Closed AlexanderPico closed 5 years ago

AlexanderPico commented 5 years ago
gabora commented 5 years ago

Hi, I think my problem is related to this issue.

I am trying to set the "Node Border Line Type" property for my current network. I didnt find an appropriate set-function, but then I thought I could use updateStyleMapping together with mapVisualProperty

here is the code:

 mvp <- mapVisualProperty(visual.prop = "Node Border Line Type",
                                               table.column = "node_type", 
                                               mapping.type = "d",
                                               table.column.values = c("non-measured","measured","input"), 
                                               visual.prop.values = c("Dots","Solid","Solid"))

updateStyleMapping(style.name = "CC_v1", mvp)  # CC_v1 is my custom made style in Cytoscape. 

But this does not work, altough I dont get back any error message. I tried both visual.prop = "Node Border Line Type" and visual.prop = "NODE_BORDER_LINE_TYPE"

Is there any solution for this? Where does this go wrong? thanks!

AlexanderPico commented 5 years ago

You took the right approach. The visual.prop name, however, is not correct. You can retrieve the list of all possible visual properties with getVisualPropertyNames(). You'll find NODE_BORDER_STROKE is the one you want.

AlexanderPico commented 5 years ago

I'll look into adding a check for visual.prop and returning the possible values as part of a friendly error message. Thanks for the question.

gabora commented 5 years ago

Thanks a lot for fast response! Maybe mentioning the getVisualPropertyNames function (adding to the See also section) on the mapVisualProperty help page would be also useful:)

AlexanderPico commented 5 years ago

I went ahead and did all of the above:

These will be in the next bioconductor release April 30th and in dev, in the meantime.