Proteomicslab57357 / UniprotR

Retrieving Information of Proteins from Uniprot
GNU General Public License v3.0
59 stars 18 forks source link

There is no package called ‘GenomicAlignments and error "name'Internet connection problem occurs and the function will return the original error" #31

Closed amechakra closed 1 year ago

amechakra commented 1 year ago

Hi,

I was looking for a package to retrieve gene symboles from UniProt IDs and I found your package. Thanks for work. After installing it in R, when I call the library UniporotR >library(UniprotR), I have the following error :

Error: package or namespace load failed for ‘UniprotR’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called ‘GenomicAlignments’

Do you have an idea about the reason?

amechakra commented 1 year ago

This is fixed by installing first GenomicAlignments

if (!require("BiocManager", quietly = TRUE)) install.packages("BiocManager")

BiocManager::install("GenomicAlignments")

But then when I want to retrieve Gene names from the UniProtKB IDs, I have the following error message : cannot open the connection to 'https://www.uniprot.org/uploadlists/?query=Q8WZ42&format=tab&from=UniProtKB&to=Gene Name'Internet connection problem occurs and the function will return the original error

This is my code (with generic file names and paths):

library(xlsx) myfile <- read.xlsx("path to my xlsx file containing a column with UniProtKB IDs", sheet=1) ids <- myfile$UniProtKBcolumn

ConvertID

ConvertID(ids, ID_from = "UniProtKB" , ID_to = "Gene Name", directorypath = "/Users/x/Desktop")

Is that an error in the "ID_to" name, or does the code only support a vector in stead of ids(xlsx file that you can find attached)?

Uniprotlist.xlsx

MohmedSoudy commented 1 year ago

Hi @amechakra, This problem is similar to #14 It's due to dependency "alakazam" version 1.1.0 while UniprotR requires alakazam version 1.0.0. This problem will be solved in the next version of UniprotR and can be solved now by installing alakazam before installing UniprotR using install.packages("https://cran.r-project.org/src/contrib/Archive/alakazam/alakazam_1.0.0.tar.gz", repo=NULL, type="source")