cytoscape / RCy3

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

getNetworkSuid does not work for Name including digits (?) #76

Closed kozo2 closed 4 years ago

kozo2 commented 4 years ago

The error

Error in print.default("NET TITLE: ", title) : invalid 'digits' argument
In addition: Warning message:
In print.default("NET TITLE: ", title) : NAs introduced by coercion

How to reproduce the error

library(RCy3)
installApp('KEGGscape')
library(httr)
GET("http://localhost:1234/keggscape/v1/mmu04150")
networks = getNetworkList()
setCurrentNetwork(networks[1])
# or
getNetworkSuid(networks[1])
khanspers commented 4 years ago

I just tried this and didn't see the error. The response was:

getNetworkSuid(networks[1]) [1] 80

kozo2 commented 4 years ago

Hmm... By the way, I'm using Windows. And I add a little more information.

> library(RCy3)
Registered S3 method overwritten by 'R.oo':
  method        from       
  throw.default R.methodsS3
> installApp('KEGGscape')
[1] "App KEGGscape installed"
> library(httr)
> GET("http://localhost:1234/keggscape/v1/mmu04150")
Response [http://localhost:1234/keggscape/v1/mmu04150]
  Date: 2019-10-16 20:42
  Status: 204
  Content-Type: <unknown>
<EMPTY BODY>
> networks = getNetworkList()
> networks[1]
[1] "mTOR signaling pathway [mmu04150]"
> getNetworkSuid(networks[1])
Error in print.default("NET TITLE: ", title) : invalid 'digits' argument
In addition: Warning message:
In print.default("NET TITLE: ", title) : NAs introduced by coercion
> cytoscapeApiVersions()
[1] "v1"
> cytoscapeVersionInfo()
      apiVersion cytoscapeVersion 
            "v1"          "3.7.2" 
> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18999)

Matrix products: default

locale:
[1] LC_COLLATE=Japanese_Japan.932  LC_CTYPE=Japanese_Japan.932    LC_MONETARY=Japanese_Japan.932
[4] LC_NUMERIC=C                   LC_TIME=Japanese_Japan.932    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] httr_1.4.1  RCy3_2.5.14

loaded via a namespace (and not attached):
 [1] XML_3.98-1.20       R.methodsS3_1.7.1   R6_2.4.0            stats4_3.6.1       
 [5] magrittr_1.5        graph_1.63.0        curl_4.2            R.oo_1.22.0        
 [9] R.utils_2.9.0       RJSONIO_1.3-1.3     tools_3.6.1         igraph_1.2.4.1     
[13] parallel_3.6.1      compiler_3.6.1      pkgconfig_2.0.3     BiocGenerics_0.31.6
> 
khanspers commented 4 years ago

I am on Mac OSX.

Here's my information. We have different versions of RCy3.

library(RCy3) Registered S3 method overwritten by 'R.oo': method from
throw.default R.methodsS3 installApp('KEGGscape') [1] "App KEGGscape installed" library(httr) GET("http://localhost:1234/keggscape/v1/mmu04150") Response [http://localhost:1234/keggscape/v1/mmu04150] Date: 2019-10-16 22:10 Status: 204 Content-Type:

networks = getNetworkList() networks[1] [1] "mTOR signaling pathway [mmu04150]" getNetworkSuid(networks[1]) [1] 990 cytoscapeVersionInfo() apiVersion cytoscapeVersion "v1" "3.7.2" sessionInfo() R version 3.6.0 (2019-04-26) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS Mojave 10.14.6

Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] httr_1.4.1 RCy3_2.4.4

loaded via a namespace (and not attached): [1] XML_3.98-1.20 R.methodsS3_1.7.1 R6_2.4.0 stats4_3.6.0
[5] magrittr_1.5 graph_1.62.0 curl_4.0 R.oo_1.22.0
[9] R.utils_2.9.0 RJSONIO_1.3-1.2 tools_3.6.0 igraph_1.2.4.1
[13] parallel_3.6.0 compiler_3.6.0 pkgconfig_2.0.2 BiocGenerics_0.30.0

AlexanderPico commented 4 years ago

I can reproduce the error (on a Mac). @khanspers, you have an old version :)

@kozo, it looks like I accidentally committed a buggy print statement in the function recently. I've have fixed it and it will update in the dev version at bioconductor in a few days and the next official release (end of month). In the meantime you can install it from github.

kozo2 commented 4 years ago

Sorry for my late reply. I checked that there are no problems now(version 2.6.0). Thank you.