This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error in GDC download in TCGAbiolinks

Hello all, could you please help me, I can't download data from TCGA.

library(TCGAbiolinks)
stadquery <- GDCquery(project = "TCGA-STAD", 
                  data.category = "Transcriptome Profiling",
                  data.type = "Gene Expression Quantification",
                  workflow.type = "STAR - Counts", legacy = F,
                  experimental.strategy = "RNA-Seq") 
GDCdownload(query = stadquery, method = "api")

Unfortunately when I run GDCdownload I get this error:

Downloading: 260 MB     At least one of the chunks download was not correct. We will retry
Downloading chunk 1 of 2 (235 files, size = 998.900727 MB) as Mon_Jan_23_20_37_03_2023_0.tar.gz
Downloading: 260 MB     Error in GDCdownload.aux(server, manifest.aux, name.aux, path) : 

 There was an error in the download process (we might had a connection problem with GDC server).
Please run this function it again.
Try using method = `client` or setting files.per.chunk to a small number.

I also tried "client" method but I get this error:

Downloading data for project TCGA-STAD
trying URL '/files/public/file/gdc-client_v1.6.1_Windows_x64.zip'
Error in download.file(url, ...) : 
  cannot open URL '/files/public/file/gdc-client_v1.6.1_Windows_x64.zip'
In addition: Warning message:
In download.file(url, ...) :
URL '/files/public/file/gdc-client_v1.6.1_Windows_x64.zip': status was 'URL using bad/illegal format or missing URL

I also tried files.per.chunk...

I really need the data and I don't know what to do. I would be grateful if you could help me.

Thanks in advance

tcgabiolinks r

1 answer

Try

GDCdownload(query = stadquery, method = "api", files.per.chunk = 1)

and try to connect internet by ethernet cable

This worked for me

Good Luck :)

I have the same issue!

I am using R4.2.3 on windows. I used the method you suggested, I have changed my internet connection and also I used vpn. but still I am getting these two errors.

First, in GDCdownload:

Error in if (ret == 1) break : argument is of length zero

Second on GDCprepare since GDCdownload didn't download the files completely

The function I'm using is:

NewData <- GDCquery(project = "TCGA-PRAD",data.category = "Transcriptome Profiling", 
                      data.type = "Gene Expression Quantification", workflow.type = "STAR - Counts", access = "Open")

GDCdownload(query = NewData, method = "api")
Pre <- GDCprepare(NewData)

Thanks!

Log in to answer this question.