cytoscape / RCy3

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

add subdomain param to CyNDEx functions #114

Closed AlexanderPico closed 3 years ago

AlexanderPico commented 3 years ago

to support interfacing with 'test' and other ndexbio.org subdomains

dotasek commented 3 years ago

If this hasn't been released yet, I would advocate for re-opening with one change:

The NDEx URL should be able to be specified as a full URL, not just by subdomain.

There are a few important users of NDEx that use a locally running NDEx database to store networks. This URL could be anything, not just *.ndexbio.org.

Perhaps an ndexUrl=http://public.ndexbio.org/ parameter could serve this purpose.

AlexanderPico commented 3 years ago

@dotasek Cool! This has only been released in the GitHub branch. It won't be released at Bioconductor until mid-to-late April.

Currently, the code uses this serverUrl by default: http://ndexbio.org/v2 Do you know if the "v2" necessary and constant, or should that be part of the user-supplied value, e.g., serverUrl="http://ndexbio.org/v2" by default and if they provide their own, then they'll know to include the "v2" or not?

dotasek commented 3 years ago

Good question regarding the  v2 path.

It is not a constant. Most endpoints exist in v2, but there are new ones in v3, mostly involved with the new CX improvements. 

It might make sense to set that as a parameter, or set up a v3 function to handle newer NDEx API.

AlexanderPico commented 3 years ago

So maybe: ndex.url and ndex.version parameters with defaults of http://ndexbio.org and v2 respectively?

dotasek commented 3 years ago

Actually, at the moment, this is constrained to two functions, for import and export of CX, correct?

If that's the case, I think we should set it to 'v2' in these functions, without offering a parameter. Later we can create new functions to handle CX version 2 export (say importCX2NetworkFromNDEx and exportCX2NetworkToNDEx) that always use v3. There's no immediate need for CX version 2 support, so the new functions can be left for later.

dotasek commented 3 years ago

I compared my suggestion to what was done in Jing's ndex-js-client, and the two approaches align. All the import and export is hard coded to use v2, and v3 is so far only used in one new getCX2Network function.