nanxstats / Rcpi

💊 Molecular informatics toolkit with integration of bioinformatics and cheminformatics tools for drug discovery
https://nanx.me/Rcpi/
Artistic License 2.0
35 stars 12 forks source link

getFASTAFromUniProt(id) #5

Closed LutzFreytag closed 5 years ago

LutzFreytag commented 5 years ago

The example returns an empty character string

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

getFASTAFromUniProt(id) [1] "" "" ""

sessionInfo() R version 3.5.1 (2018-07-02) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale: [1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252 LC_MONETARY=German_Germany.1252 [4] LC_NUMERIC=C LC_TIME=German_Germany.1252

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

other attached packages: [1] Rcpi_1.17.2 bindrcpp_0.2.2 knitr_1.20 gridExtra_2.3 umap_0.2.0.0 Rtsne_0.15
[7] forcats_0.3.0 stringr_1.3.1 dplyr_0.7.8 purrr_0.2.5 readr_1.1.1 tidyr_0.8.2
[13] tibble_1.4.2 ggplot2_3.1.0 tidyverse_1.2.1

loaded via a namespace (and not attached): [1] nlme_3.1-137 bitops_1.0-6 lubridate_1.7.4 bit64_0.9-7
[5] doParallel_1.0.14 httr_1.3.1 rprojroot_1.3-2 tools_3.5.1
[9] backports_1.1.2 R6_2.3.0 DT_0.5 DBI_1.0.0
[13] lazyeval_0.2.1 BiocGenerics_0.28.0 colorspace_1.3-2 withr_2.1.2
[17] tidyselect_0.2.5 bit_1.1-14 compiler_3.5.1 cli_1.0.1
[21] rvest_0.3.2 Biobase_2.42.0 xml2_1.2.0 labeling_0.3
[25] scales_1.0.0 digest_0.6.18 rmarkdown_1.10 XVector_0.22.0
[29] base64enc_0.1-3 pkgconfig_2.0.2 htmltools_0.3.6 itertools_0.1-3
[33] highr_0.7 htmlwidgets_1.3 rlang_0.3.0.1 readxl_1.1.0
[37] rstudioapi_0.8 RSQLite_2.1.1 bindr_0.1.1 jsonlite_1.5
[41] GOSemSim_2.8.0 RCurl_1.95-4.11 magrittr_1.5 GO.db_3.7.0
[45] Matrix_1.2-14 Rcpp_1.0.0 munsell_0.5.0 S4Vectors_0.20.1
[49] reticulate_1.10 stringi_1.2.4 yaml_2.2.0 zlibbioc_1.28.0
[53] plyr_1.8.4 blob_1.1.1 parallel_3.5.1 crayon_1.3.4
[57] rcdklibs_2.0 lattice_0.20-35 Biostrings_2.50.1 haven_1.1.2
[61] hms_0.4.2 pillar_1.3.0 rjson_0.2.20 codetools_0.2-15
[65] reshape2_1.4.3 stats4_3.5.1 ChemmineR_3.34.1 rcdk_3.4.7.1
[69] glue_1.3.0 evaluate_0.12 modelr_0.1.2 foreach_1.4.4
[73] png_0.1-7 cellranger_1.1.0 gtable_0.2.0 assertthat_0.2.0
[77] broom_0.5.0 rsvg_1.3 rJava_0.9-10 fingerprint_3.5.7
[81] iterators_1.0.10 AnnotationDbi_1.44.0 memoise_1.1.0 IRanges_2.16.0
[85] fmcsR_1.24.0

nanxstats commented 5 years ago

Hi @LutzFreytag -good catch! I've just spent some time fixing all problematic API endpoints in https://github.com/road2stat/Rcpi/commit/73e546ed0987658ea5304a92d16cceab8641e88b, since this was first written about six years ago so the world changed a lot...

You're welcome to try the GitHub version. I also push the new version to Bioconductor release/devel, and it may take a day or two for it to be available there.

nanxstats commented 5 years ago

These examples should all work now after this fix:

library("Rcpi")

getFASTAFromUniProt(c("P00750", "P00751", "P00752"))
getSeqFromUniProt(c("P00750", "P00751", "P00752"))
getPDBFromRCSBPDB(c("4HHB", "4FF9"))
getSeqFromRCSBPDB(c("4HHB", "4FF9"))
getSmiFromChEMBL(c("CHEMBL1430", "CHEMBL1431"))
getMolFromDrugBank("DB00859")
getSmiFromDrugBank("DB00859")