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

getFASTAFromUniProt and getSeqFromUniProt errors #14

Closed
Amirreza-Mousavi opened this issue Nov 3, 2021 · 2 comments
Closed

getFASTAFromUniProt and getSeqFromUniProt errors #14

Amirreza-Mousavi opened this issue Nov 3, 2021 · 2 comments
Assignees

Comments

@Amirreza-Mousavi
Copy link

id = c('P00750', 'P00751', 'P00752')

getFASTAFromUniProt(id) 
#gives "" "" ""

from R documentations of getFASTAFromUniProt does not run properly. the second line gives an empty character string, which will result in errors in other functions dependent on getFASTAFromUniProt such as getSeqFromUniProt.

Also,

id = c('P00750', 'P00751', 'P00752')

getSeqFromUniProt(id)
#ERROR

leads to error.

(Error in FUN(X[[i]], ...) : no line starting with a > character found)

which is obviously resulted from problems in getFASTAFromUniProt.

It seems that getURLAsynchronous in the implementation of getFASTAFromUniProt is causing the problem somehow. It's better to replace it with some equivalent base-R function.

@askarlupka
Copy link

askarlupka commented Jul 13, 2022

I'm having the same issue with getSeqFromUniProt. I believe the URL has changed on uniprot's end. In the getFASTAFromUniProt function getURLAsynchronous is directed to a website. However I think that has recently been updated to, "https://https://rest.uniprot.org/uniprotkb/", id, ".fasta"

> getFASTAFromUniProt
function (id, parallel = 5)
{
fastaURL = paste0("https://www.uniprot.org/uniprot/", id,
".fasta")
fastaTxt = getURLAsynchronous(url = fastaURL, perform = parallel)
return(fastaTxt)
}
<bytecode: 0x7fcc0e8555c0>
<environment: namespace:Rcpi>

Example: "https://www.uniprot.org/uniprot/P00750.fasta" gets redirected to "https://rest.uniprot.org/uniprotkb/P00750.fasta"

@nanxstats nanxstats self-assigned this Jul 18, 2022
@nanxstats
Copy link
Owner

Thanks @askarlupka and @Amirreza-Mousavi for reporting this.

I've fixed the issue in this repo - you can try it with remotes::install_github("nanxstats/Rcpi").

I also submitted the updated version v1.33.2 (devel) and v1.32.2 (release) to Bioconductor. It may take a few days to fully propagate through their build system.

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

3 participants