Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating new UniProt.ws object fails to query uniprot.org, HTTP status '400 Bad Request' #21

Closed
buijt opened this issue Jun 28, 2022 · 5 comments
Assignees

Comments

@buijt
Copy link

buijt commented Jun 28, 2022

> library(UniProt.ws)
> UniProt.ws()
Error in file(con, "r") : 
  cannot open the connection to 'https://www.uniprot.org/uniprot/?query=organism:9606&format=tab&columns=id'
In addition: Warning message:
In file(con, "r") :
  cannot open URL 'https://rest.uniprot.org/uniprotkb/query=organism:9606&format=tab&columns=id': HTTP status was '400 Bad Request'
>
> sessionInfo()
R version 4.2.1 (2022-06-23 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8  LC_CTYPE=English_United States.utf8    LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C                           LC_TIME=English_United States.utf8    

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

other attached packages:
[1] UniProt.ws_2.36.0   BiocGenerics_0.42.0 RSQLite_2.2.14     

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.8.3           pillar_1.7.0           compiler_4.2.1         BiocManager_1.30.18    dbplyr_2.2.1          
 [6] GenomeInfoDb_1.32.2    XVector_0.36.0         bitops_1.0-7           tools_4.2.1            zlibbioc_1.42.0       
[11] bit_4.0.4              tibble_3.1.7           lifecycle_1.0.1        memoise_2.0.1          BiocFileCache_2.4.0   
[16] pkgconfig_2.0.3        png_0.1-7              rlang_1.0.3            DBI_1.1.3              cli_3.3.0             
[21] filelock_1.0.2         curl_4.3.2             fastmap_1.1.0          GenomeInfoDbData_1.2.8 httr_1.4.3            
[26] dplyr_1.0.9            rappdirs_0.3.3         Biostrings_2.64.0      generics_0.1.2         S4Vectors_0.34.0      
[31] vctrs_0.4.1            IRanges_2.30.0         tidyselect_1.1.2       stats4_4.2.1           bit64_4.0.5           
[36] glue_1.6.2             Biobase_2.56.0         R6_2.5.1               fansi_1.0.3            AnnotationDbi_1.58.0  
[41] purrr_0.3.4            magrittr_2.0.3         blob_1.2.3             ellipsis_0.3.2         KEGGREST_1.36.2       
[46] assertthat_0.2.1       utf8_1.2.2             RCurl_1.98-1.7         cachem_1.0.6           crayon_1.5.1      

Announcement on the new UniProt website:
image

I started encountering this error today and I believe this may be due to a change in the UniProt API coinciding with the launch of the new UniProt website. I otherwise cannot find any announcement from UniProt about the new API. The new API syntax breaks the UniProt.ws package and appears to have slightly different behavior in its return values.

The package is trying to connect to https://www.uniprot.org/uniprot/?query=organism:9606&format=tab&columns=id which is no longer valid with the new API, and returns HTML 400 status code.

UniProt's new API (https://rest.uniprot.org/uniprotkb/) breaks the package. The closest functioning API call to the above that I can determine is: https://rest.uniprot.org/uniprotkb/search?query=organism_id:9606&format=tsv&fields=accession

The old website (https://legacy.uniprot.org/) will return the old result, but I suspect the legacy API will be retired at some point. The website says the legacy website will be available until the 2022_03 release, at which point the legacy API would also be shut down. https://legacy.uniprot.org/uniprot/?query=organism:9606&format=tab&columns=id

I believe all the API calls in the package will need to be updated to support the new UniProt API following this documentation: https://www.uniprot.org/help/return_fields

@proteomicsIJC
Copy link

Same issue here. It seems clear that the package must be update with the new API.

@LiNk-NY
Copy link
Contributor

LiNk-NY commented Aug 5, 2022

Hi @proteomicsIJC @buijt
Thanks for reporting. We're working on updating the package to the new API.
Best,
Marcel

@LiNk-NY LiNk-NY self-assigned this Aug 5, 2022
@LiNk-NY
Copy link
Contributor

LiNk-NY commented Aug 9, 2022

Hi @proteomicsIJC @buijt

I've made changes to the package to restore as much functionality as possible.
Please open up another issue if you are having trouble with the software.

See package version 2.37.1, which should be built in 24 - 48 hours.

Best regards,
Marcel

@LiNk-NY LiNk-NY closed this as completed Aug 9, 2022
@proteomicsIJC
Copy link

proteomicsIJC commented Aug 10, 2022 via email

@cst-ramirez
Copy link

I used to have this problem, but it is now totally fixed with version 2.37.5!
Thanks guys, love the R package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants