waldronlab / cBioPortalData

Integrate the cancer genomics portal, cBioPortal, using MultiAssayExperiment
https://waldronlab.io/cBioPortalData/
30 stars 13 forks source link

cbiodfci access #71

Closed BiotechPedro closed 1 year ago

BiotechPedro commented 1 year ago

Hi team,

FOA, thanks for this package! It makes super easy to work with so many databases!

My question is regarding an error I am facing when trying to access to cbiodfci.org by {cBioPortalData}. I requested the access to the web, so from there I downloaded the needed token, but when I use it with the following code it turns into an error and I cannot access. Would you mind to help me?

cbio <- cBioPortal(hostname = "[cbiodfci.org](http://cbiodfci.org/)", protocol = "https", token = "../misc/cbioportal_data_access_token.txt", api. = "/api/api-docs")

<!doctype html>HTTP Status 401 – Unauthorized

HTTP Status 401 – Unauthorized


Type Status Report

Message Unauthorized

Description The request has not been applied because it lacks valid authentication credentials for the target resource.


Apache Tomcat/8.5.34

Error: '.service_validate_md5sum' failed: Unauthorized (HTTP 401).

sessionInfo()

R version 4.2.1 (2022-06-23) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.5 LTS Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/liblapack.so.3 locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages: [1] stats4 stats graphics grDevices utils datasets methods base
other attached packages: [1] cBioPortalData_2.8.2 MultiAssayExperiment_1.22.0 SummarizedExperiment_1.26.1 [4] Biobase_2.56.0 GenomicRanges_1.48.0 GenomeInfoDb_1.32.4
[7] IRanges_2.30.1 S4Vectors_0.34.0 BiocGenerics_0.42.0
[10] MatrixGenerics_1.8.1 matrixStats_0.62.0 AnVIL_1.8.7
[13] dplyr_1.0.10
loaded via a namespace (and not attached): [1] bitops_1.0-7 bit64_4.0.5 filelock_1.0.2 progress_1.2.2
[5] httr_1.4.4 GenomicDataCommons_1.20.3 tools_4.2.1 utf8_1.2.2
[9] R6_2.5.1 DBI_1.1.3 tidyselect_1.1.2 prettyunits_1.1.1
[13] TCGAutils_1.16.1 bit_4.0.4 curl_4.3.2 compiler_4.2.1
[17] rvest_1.0.3 cli_3.4.1 formatR_1.12 xml2_1.3.3
[21] DelayedArray_0.22.0 rtracklayer_1.56.1 readr_2.1.2 rappdirs_0.3.3
[25] rapiclient_0.1.3 RCircos_1.2.2 Rsamtools_2.12.0 stringr_1.4.1
[29] digest_0.6.29 XVector_0.36.0 pkgconfig_2.0.3 dbplyr_2.2.1
[33] fastmap_1.1.0 limma_3.52.4 rlang_1.0.6 rstudioapi_0.14
[37] RSQLite_2.2.17 BiocIO_1.6.0 generics_0.1.3 jsonlite_1.8.0
[41] BiocParallel_1.30.3 RCurl_1.98-1.8 magrittr_2.0.3 GenomeInfoDbData_1.2.8
[45] futile.logger_1.4.3 Matrix_1.5-1 Rcpp_1.0.9 fansi_1.0.3
[49] lifecycle_1.0.2 stringi_1.7.8 yaml_2.3.5 RaggedExperiment_1.20.1
[53] RJSONIO_1.3-1.8 zlibbioc_1.42.0 BiocFileCache_2.4.0 grid_4.2.1
[57] blob_1.2.3 parallel_4.2.1 crayon_1.5.2 lattice_0.20-45
[61] Biostrings_2.64.1 splines_4.2.1 GenomicFeatures_1.48.4 hms_1.1.2
[65] KEGGREST_1.36.3 knitr_1.40 pillar_1.8.1 rjson_0.2.21
[69] codetools_0.2-18 biomaRt_2.52.0 futile.options_1.0.1 XML_3.99-0.10
[73] glue_1.6.2 lambda.r_1.2.4 data.table_1.14.2 vctrs_0.4.2
[77] png_0.1-7 tzdb_0.3.0 purrr_0.3.4 tidyr_1.2.1
[81] assertthat_0.2.1 cachem_1.0.6 xfun_0.33 restfulr_0.0.15
[85] survival_3.4-0 tibble_3.1.8 RTCGAToolbox_2.26.1 GenomicAlignments_1.32.1 [89] AnnotationDbi_1.58.0 memoise_2.0.1 ellipsis_0.3.2

LiNk-NY commented 1 year ago

Hi Pedro, @BiotechPedro Sorry for the late response. I am traveling to a conference. Have you tried to authenticate with a www.cbiodfci.org hostname? Also, you should try to use the latest version of cBioPortalData on GitHub (it implements a more robust way of working with tokens). Best regards, Marcel

BiotechPedro commented 1 year ago

Hi Marcel, @LiNk-NY Don't worry too much, it's not super urgent! I've also tried that host name and doesn't work. Also, I've updated to 2.13.6 and still I am getting an error :/ Best, Pedro

BiotechPedro commented 1 year ago

Also, I forgot to mention that after downloading the token .txt I run in the concrete folder the following code: curl -X GET "https://www.cbioportal.org/api/studies" -H "accept: application/json" -H "Authorization: Bearer mytoken", but I don't know if it is correct.

BiotechPedro commented 1 year ago

I solved it! My problem was that I was running that code in the terminal, but then was using R inside a singularity image .sif. Once I run the code in a terminal inside the image, it worked.

I hope is helpful for others in the future!

Thanks,

Pedro