MassBank / RMassBank

Playground for experiments on the official http://bioconductor.org/packages/devel/bioc/html/RMassBank.html
Other
12 stars 15 forks source link

Fix/issue250 #251

Closed sneumann closed 3 years ago

sneumann commented 3 years ago

His merely cuts RCurl out of the mix, and has not yet adapted the JSON parsing to the httr way of things. Also, I get a strange SUMMARY: processing the following file failed: but six lines further down it is Status: 5 WARNINGs, 4 NOTEs So please test if possible. Yours, Steffen

sneumann commented 3 years ago

Now with data <- httr::content(res, type="text", encoding="UTF-8") to avoid the warnings. Yours, Steffen

schymane commented 3 years ago

I can confirm that I have tested all adjusted functions in webAccess.R on win and they work and deliver expected outputs. The UTF-8 encoding seems only necessary to avoid messages for PubChem (not the others) but it does not affect the others either way so let's leave as is ;-) By adding it to the function explicitly, the messages observed last night disappear.

> getPcSynonym(query)
No encoding supplied: defaulting to UTF-8.
[1] "Atrazine"

vs now

> getPcSynonym(query)
[1] "Atrazine"

The diffs still show up huge so I'm not sure what changed in leMsmsRaw.R, @sneumann please point me to anything there I should test?

The travis build only breaks for the two commits where RCurl is removed (and not the first, where just the timeouts changed), the error message doesn't mean anything to me tho ... @sneumann ?

image

I'm still waiting on feedback from someone else who could reproduce the errors in win to confirm that this also fixes issues his side.

For the record (I tested the function upgrades manually, so RMB is the current version I had installed:

> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17763)

Matrix products: default

locale:
[1] LC_COLLATE=English_Australia.1252  LC_CTYPE=English_Australia.1252   
[3] LC_MONETARY=English_Australia.1252 LC_NUMERIC=C                      
[5] LC_TIME=English_Australia.1252    

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

other attached packages:
[1] RCurl_1.98-1.2   RMassBank_2.99.2 Rcpp_1.0.2       rjson_0.2.20     httr_1.4.1      

loaded via a namespace (and not attached):
 [1] tidyselect_1.0.0      purrr_0.3.3           rJava_0.9-11         
 [4] lattice_0.20-38       colorspace_1.4-1      stats4_3.6.1         
 [7] yaml_2.2.0            fingerprint_3.5.7     vsn_3.52.0           
[10] XML_3.98-1.20         rlang_0.4.5           pillar_1.4.2         
[13] glue_1.3.1            MSnbase_2.10.1        mzR_2.18.1           
[16] BiocParallel_1.18.1   affy_1.62.0           BiocGenerics_0.30.0  
[19] affyio_1.54.0         foreach_1.4.7         plyr_1.8.4           
[22] mzID_1.22.0           ProtGenerics_1.16.0   zlibbioc_1.30.0      
[25] munsell_0.5.0         pcaMethods_1.76.0     gtable_0.3.0         
[28] rcdklibs_2.0          codetools_0.2-16      Biobase_2.44.0       
[31] IRanges_2.18.3        doParallel_1.0.15     parallel_3.6.1       
[34] curl_4.2              itertools_0.1-3       preprocessCore_1.46.0
[37] scales_1.0.0          BiocManager_1.30.10   limma_3.40.6         
[40] rcdk_3.4.7.1          S4Vectors_0.22.1      impute_1.58.0        
[43] ggplot2_3.2.1         png_0.1-7             digest_0.6.21        
[46] dplyr_0.8.5           ncdf4_1.16.1          grid_3.6.1           
[49] tools_3.6.1           bitops_1.0-6          magrittr_1.5         
[52] lazyeval_0.2.2        tibble_2.1.3          crayon_1.3.4         
[55] pkgconfig_2.0.3       MASS_7.3-51.4         assertthat_0.2.1     
[58] rstudioapi_0.10       iterators_1.0.12      R6_2.4.1             
[61] MALDIquant_1.19.3     compiler_3.6.1       
schymane commented 3 years ago

Confirmation from Paul T that the httr code works for him on win and linux too...