Re: [Bioc-devel] Replacement for CytoscapeWindowClass from devel RCy3

2018-03-30 Thread Robert M. Flight
Thanks again Alex!

Copying bioc-devel list in case anyone else has similar issues.

On Fri, Mar 30, 2018, 8:15 PM Alex Pico 
wrote:

> I think that’s correct.  A few tips based on looking at your particular
> usage…
>
> 1) cw <- CytoscapeWindow(graphName, graph=ccGraph, …)
>
> ...becomes
>
> net.suid <- createNetworkFromGraph(graph=ccGraph,title=graphName, ...)
>
> 2) You don’t need `displayGraph(cw)` anymore
>
> 3) You can simply delete `cw` from all subsequent functions. Optionally,
> you can replace it with `network=net.suid`
>
> 4) You don’t need `redraw(cw)` anymore
>
> 5) Your “Rule” functions become...
>
> setNodeTooltipMapping(nodeAtts[toolTipLoc[1]])
>
> setNodeColorMapping(‘fillcolor’, tmpCols, tmpCols, ‘d’, default.color='
> #FF’)
> # or, if you have a column of hex colors already, try this:
> setNodeColorMapping(‘fillcolor’, tmpCols, mapping.type= ‘p’,
> default.color='#FF’)
>
> setNodeShapeMapping(‘shape’, nodeShapes, nodeShapes, ‘d’, default.shape='
> ellipse' )
> # again, if you have a column of hex colors already, try this:
> setNodeShapeMapping(‘shape’, nodeShapes, mapping.type= ‘p’, default.shape=
> 'ellipse')
>
>
> Ok. Hope that helps!
>  - Alex
>
> On Mar 30, 2018, at 4:54 PM, Robert M. Flight  wrote:
>
> OK, I'll have to try out some of the examples and see if it works. In most
> of my methods it would just mean removing that part of the signature, I
> think.
>
> Robert
>
> On Fri, Mar 30, 2018, 7:44 PM Alex Pico 
> wrote:
>
>> Correct. This simplification comes at the cost of Object types. The
>> advantages, however, include avoiding a false sense of state when CyREST is
>> stateless. There was an whole class of errors and user issues based on
>> breaks between the R Object and the Cytoscape network. Now, you can even
>> restart R and pick right up in the middle of script (as far as RCy3 is
>> concerned).
>>
>> Also, since in most cases you are working with one network at a time, you
>> can actually ignore the SUID and let the default behavior (of working with
>> the “current” network) take over and greatly simplify your scripts.
>>
>>  - Alex
>>
>> On Mar 30, 2018, at 4:05 PM, Robert M. Flight 
>> wrote:
>>
>> Alex,
>>
>> That makes sense. Appreciate the info on SUID. Again this is only a
>> simple numeric though, right?? No class attribrute or formal class with it??
>>
>> I like the fact that currently my methods know they are operating on a
>> cytoscape network object, this breaks that paradigm.
>>
>> Will have to think about the best way to handle this.
>>
>> Robert
>>
>> On Fri, Mar 30, 2018, 6:50 PM Alex Pico 
>> wrote:
>>
>>> Hi Robert,
>>>
>>> Indeed, lots of changes being made in this major version bump to RCy3.
>>> The goals are to align better with the rapid development of Cytoscape’s
>>> REST API. A description of how to “upgrade” existing scripts is provided
>>> here:
>>> https://github.com/cytoscape/RCy3/wiki/Upgrading-Existing-Scripts
>>>
>>>
>>> In the case you pointed to the upgrade is not too bad (see attached):
>>>  * Replace all instances/references to CyWindow Objects with a simple
>>> numeric, the network SUID.
>>> *Note: that even this reference is now optional for all functions, i.e.,
>>> you can leave it out completely if you know that you are operating on the
>>> “current” network in Cytoscape. If you’re not sure, then this is how you
>>> specify networks now.*
>>>  * Replaced getAllEdgeAttributes with getTableColumns(‘edge’)
>>>
>>> That’s it!  If you have any more questions, please ask.
>>>
>>>  - Alex
>>>
>>> On Mar 30, 2018, at 9:13 AM, Robert M. Flight 
>>> wrote:
>>>
>>> My package, categoryCompare, is failing in Bioc devel.
>>>
>>> The reason appears to be exports in previous versions of RCy3 no longer
>>> being exported, namely the "CytoscapeWindowClass".
>>>
>>> I had some methods where behavior was defined based on being passed an
>>> object of "CytoscapeWindowClass" (see
>>> https://github.com/rmflight/categoryCompare/blob/7305185a65f80b108d50971b350c165a4e0cbe47/R/outCytoscape.r#L37
>>>  for
>>> an example).
>>>
>>> It appears this class no longer exists in the devel version of RCy3, and
>>> what is noted as a replacement for the deprecated function that created it
>>> (example being createNetworkFromGraph), has no specific class outside of
>>> returning a "function".
>>>
>>> I could use some advice on how I should modify my method signature to
>>> handle this for the next version of RCy3, or if the object returned will
>>> indeed have a "class" attached to them that can be checked via method
>>> signatures.
>>>
>>> Thanks,
>>>
>>> -Robert
>>>
>>> Robert M Flight, PhD
>>> Bioinformatics Research Associate
>>> Puller of Rabbits from Hats
>>> Research Parasite
>>> Resource Center for Stable Isotope Resolved Metabolomics
>>> Manager, Systems Biology and Omics Integration Journal Club
>>> 

Re: [Bioc-devel] Replacement for CytoscapeWindowClass from devel RCy3

2018-03-30 Thread Alex Pico
Hi Robert,

Indeed, lots of changes being made in this major version bump to RCy3. The 
goals are to align better with the rapid development of Cytoscape’s REST API. A 
description of how to “upgrade” existing scripts is provided here:
https://github.com/cytoscape/RCy3/wiki/Upgrading-Existing-Scripts 



In the case you pointed to the upgrade is not too bad (see attached):
 * Replace all instances/references to CyWindow Objects with a simple numeric, 
the network SUID. 
Note: that even this reference is now optional for all functions, i.e., 
you can leave it out completely if you know that you are operating on the 
“current” network in Cytoscape. If you’re not sure, then this is how you 
specify networks now.
 * Replaced getAllEdgeAttributes with getTableColumns(‘edge’)

That’s it!  If you have any more questions, please ask.
 - Alex

> On Mar 30, 2018, at 9:13 AM, Robert M. Flight  wrote:
> 
> My package, categoryCompare, is failing in Bioc devel.
> 
> The reason appears to be exports in previous versions of RCy3 no longer being 
> exported, namely the "CytoscapeWindowClass".
> 
> I had some methods where behavior was defined based on being passed an object 
> of "CytoscapeWindowClass" (see 
> https://github.com/rmflight/categoryCompare/blob/7305185a65f80b108d50971b350c165a4e0cbe47/R/outCytoscape.r#L37
>  
> 
>  for an example).
> 
> It appears this class no longer exists in the devel version of RCy3, and what 
> is noted as a replacement for the deprecated function that created it 
> (example being createNetworkFromGraph), has no specific class outside of 
> returning a "function".
> 
> I could use some advice on how I should modify my method signature to handle 
> this for the next version of RCy3, or if the object returned will indeed have 
> a "class" attached to them that can be checked via method signatures.
> 
> Thanks,
> 
> -Robert
> 
> Robert M Flight, PhD
> Bioinformatics Research Associate
> Puller of Rabbits from Hats
> Research Parasite
> Resource Center for Stable Isotope Resolved Metabolomics
> Manager, Systems Biology and Omics Integration Journal Club
> Markey Cancer Center
> CC434 Roach Building
> University of Kentucky
> Lexington, KY
> 
> Twitter: @rmflight
> Web: rmflight.github.io 
> ORCID: http://orcid.org/-0001-8141-7788 
> 
> EM rfligh...@gmail.com 
> PH 502-509-1827 
> 
> To call in the statistician after the experiment is done may be no more than 
> asking him to perform a post-mortem examination: he may be able to say what 
> the experiment died of. - Ronald Fisher

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


[Bioc-devel] Replacement for CytoscapeWindowClass from devel RCy3

2018-03-30 Thread Robert M. Flight
My package, categoryCompare, is failing in Bioc devel.

The reason appears to be exports in previous versions of RCy3 no longer
being exported, namely the "CytoscapeWindowClass".

I had some methods where behavior was defined based on being passed an
object of "CytoscapeWindowClass" (see
https://github.com/rmflight/categoryCompare/blob/7305185a65f80b108d50971b350c165a4e0cbe47/R/outCytoscape.r#L37
for
an example).

It appears this class no longer exists in the devel version of RCy3, and
what is noted as a replacement for the deprecated function that created it
(example being createNetworkFromGraph), has no specific class outside of
returning a "function".

I could use some advice on how I should modify my method signature to
handle this for the next version of RCy3, or if the object returned will
indeed have a "class" attached to them that can be checked via method
signatures.

Thanks,

-Robert

Robert M Flight, PhD
Bioinformatics Research Associate
Puller of Rabbits from Hats
Research Parasite
Resource Center for Stable Isotope Resolved Metabolomics
Manager, Systems Biology and Omics Integration Journal Club
Markey Cancer Center
CC434 Roach Building
University of Kentucky
Lexington, KY

Twitter: @rmflight
Web: rmflight.github.io
ORCID: http://orcid.org/-0001-8141-7788
EM rfligh...@gmail.com
PH 502-509-1827 <(502)%20509-1827>

To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to say
what the experiment died of. - Ronald Fisher

[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel