TCGA retrieving file id from submitter_aliquot_ids using the files endpoint
0
0
Entering edit mode
5.4 years ago
sahar850 • 0

Hi, i got a list of submitter_aliquot_ids and i am trying to retrieve there file id.

so far i manege to get some result using R code with cURL in the cases endpoint.

the data i get is too maccey to use.

does anyone know how to get this information with the files endpoint?

the code i am using to create the query file (in R):

aliquot_list = read.csv(file ='file_name.csv',as.is = TRUE)
id= toString(sprintf('"%s"',aliquot_list$submitter_aliquot_ids[1:62])) 
Part1= '{"filters":{"op":"in","content":{"field":"submitter_aliquot_ids","value":[ '
Part2= '] }},"format":"TSV", "fields":"case_id,files.file_id,cases.files.file_name,submitter_aliquot_ids","size":'
Part3= paste(shQuote(2000),"}",sep="")
Sentence= paste(Part1,id,Part2,Part3, collapse=" ")
write.table(Sentence,"Payload_metadata.txt",quote=F,col.names=F,row.names=F)

the query (with cURL in the cmd):

curl --request POST --header "Content-Type: application/json" --data @Payload_metadata.txt "https://api.gdc.cancer.gov/cases" > File_metadata.txt

basically i don't know what the "fields" value should be while using the files endpoint (https://api.gdc.cancer.gov/files).

i tried the following: files.submitter_id, files.cases.aliquot_ids,files.cases.submitter_id,files.cases.submitter_aliquot_ids. non of them worked.

TCGA R • 869 views
ADD COMMENT

Login before adding your answer.

Traffic: 2530 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