Re: RCytoscape follow up

6 views
Skip to first unread message

Paul Shannon

unread,
Jun 13, 2013, 12:52:06 PM6/13/13
to Ricardo Silva, rcyto...@googlegroups.com, Paul Shannon
Hi Ricardo,

Sending lists works reliably. I think your list is actually a single string, not really a list.

You may want instead to say

myCompounds <- c("C00118", "C00111", "C00661", "C00662")
myCompounds
[1] "C00118" "C00111" "C00661" "C00662"
length(myCompounds)
[1] 4

myValues <- c(0.01, 0.02, 0.03, 0.04)
stopifnot(length(myCompounds) == length(myValues))

result = setNodeAttributesDirect (cw, 'score', 'numeric', myCompounds, myValues)

Let me know how it goes.

- Paul



On Jun 13, 2013, at 6:30 AM, Ricardo Silva wrote:

> Hi Paul,
>
> I followed your advice and imported cytoscape node list for my application, it works very well.
>
> I saw the function setNodeAttributesDirect and I'm trying to use it to send the attributes from R.
>
> When I send a single attribute for each node it is perfect, but for lists I was not able do work around, is there a way?
>
> I tried something as
>
> head(cp)
> [1] "[C00118, C00111, C00661, C00662]"
>
>
> [2] "[C11706, C16925, C10457, C10204, C17126, C14969, C16914]"
>
>
> [3] "[C05990, C10533, C10187, C10104]"
>
>
> [4] "[C00134]"
>
> mimicking the way the list appears in Cytoscape data panel, and sent
>
> setNodeAttributesDirect(cw, "Code2", "String", nodes(gr), cp)
>
>
> but, latter I can't search each value individually in the filter, they appear as a single value.
>
> If there is no implemented function in RCytoscape is there a way do to something like
>
> system("java -jar Cytoscape_v2.8.3/cytoscape.jar -n nodeInfo.noa") from R?
>
> Sorry to bother again.
>
> Thanks
>
> Ricardo

Reply all
Reply to author
Forward
0 new messages