Installing Genomicdatacommon in r
1
0
Entering edit mode
5.4 years ago

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 • 1.5k views
ADD COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode
5.4 years ago

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 COMMENT
0
Entering edit mode

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 REPLY

Login before adding your answer.

Traffic: 1489 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6