Question: Installing Genomicdatacommon in r
0
gravatar for shivangi.agarwal800
6 months ago by
shivangi.agarwal80060 wrote:

Hi

I am installing GenomicDataCommons in R, but when giving following command, getting error as:

GenomicDataCommons::status()

Error in curl::curl_fetch_memory(url, handle = handle) : 
  Could not resolve host: gdc-api.nci.nih.gov

Kindly suggest. Thanks in advance

With regards

genomicdatacommon • 259 views
ADD COMMENTlink modified 6 months ago by Vijay Lakhujani4.1k • written 6 months ago by shivangi.agarwal80060

It seems you have successfully installed GenomicDataCommons, and the problem lies in connecting to the GDC API site. Are you behind a firewall / proxy?

ADD REPLYlink written 6 months ago by h.mon25k

Thanks for your reply. No, there is nothing like that. All other things are working fine.

ADD REPLYlink written 6 months ago by shivangi.agarwal80060
0
gravatar for shivangi.agarwal800
6 months ago by
shivangi.agarwal80060 wrote:

For matching file id with TCGA barcodes, I am following Kevin post

"Question: problem in matching the names between file names and patients Id in TCGA" C: problem in matching the names between file names and patients Id in TCGA

But getting error. Kindly suggest

Regards

Shivangi

ADD COMMENTlink modified 6 months ago • written 6 months ago by shivangi.agarwal80060

Resolved the above error by installing the package in R 3.5, but got another error. I followed the commands in Kevin post, all commands ran successfully, but when I was running on my file, it gave error, I ran the commands as :

library(GenomicDataCommons)

manifest <- read.table("a.txt", header=T)

file_uuids <- manifest$id

head(file_uuids)

[1] e01ca3e0-beb0-46b7-bb7c-f5b16f966911 992a7083-28ce-4857-898e-9d4b4fbf2fl1 230082b7-39ec-4fe1-b3c6-daf35458f386 [4] 9bbada51-d827-4eea-af45-47d7b5ba138e db1b68b0-dc0a-48a5-8acb-4cd45ea125e2 5 Levels: 230082b7-39ec-4fe1-b3c6-daf35458f386 ... e01ca3e0-beb0-46b7-bb7c-f5b16f966911

library(GenomicDataCommons)

library(magrittr)

TCGAtranslateID = function(file_ids, legacy = TRUE) { + info = files(legacy = legacy) %>% + filter( ~ file_id %in% file_ids) %>% + select('cases.samples.submitter_id') %>% + results_all() + # The mess of code below is to extract TCGA barcodes + # id_list will contain a list (one item for each file_id) + # of TCGA barcodes of the form 'TCGA-XX-YYYY-ZZZ' + id_list = lapply(info$cases,function(a) { + a[[1]][[1]][[1]]}) + # so we can later expand to a data.frame of the right size + barcodes_per_file = sapply(id_list,length) + # And build the data.frame + return(data.frame(file_id = rep(ids(info),barcodes_per_file), + submitter_id = unlist(id_list))) + }

res = TCGAtranslateID(file_uuids)

res [1] file_id <0 rows> (or 0-length row.names)

contents n a.txt (I placed initially only five ids in a.txt)

id

e01ca3e0-beb0-46b7-bb7c-f5b16f966911

992a7083-28ce-4857-898e-9d4b4fbf2fl1

230082b7-39ec-4fe1-b3c6-daf35458f386

9bbada51-d827-4eea-af45-47d7b5ba138e

db1b68b0-dc0a-48a5-8acb-4cd45ea125e2

Please suggest.

ADD REPLYlink modified 6 months ago • written 6 months ago by shivangi.agarwal80060
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1956 users visited in the last hour