BioinformaticsFMRP / TCGAbiolinks

TCGAbiolinks
http://bioconductor.org/packages/devel/bioc/vignettes/TCGAbiolinks/inst/doc/index.html
289 stars 110 forks source link

Error in download.file(url, method = method, ...): download from 'https://gdc.cancer.gov/files/public/file/gdc-client_v1.6.1_OSX_x64.zip' failed #522

Open BarryWang0905 opened 2 years ago

BarryWang0905 commented 2 years ago

I tried to download data for project TCGA-LIHC, but it showed some errors that I couldn't solve. Code shows as below.

library(TCGAbiolinks) query <- GDCquery(project = "TCGA-LIHC", data.category = "Transcriptome Profiling", data.type = "Gene Expression Quantification", experimental.strategy = "RNA-Seq", workflow.type = "STAR - Counts") samplesCode <-getResults(query,cols=c("cases")) dataSample_TP <-TCGAquery_SampleTypes(barcode = samplesCode,typesample = "TP") dataSample_NT <-TCGAquery_SampleTypes(barcode = samplesCode,typesample = "NT")

queryDown <- GDCquery(project ="TCGA-LIHC", data.category ="Transcriptome Profiling", data.type ="Gene Expression Quantification", experimental.strategy = "RNA-Seq", workflow.type="STAR - Counts", barcode =c(dataSample_TP,dataSample_NT))

GDCdownload(queryDown,method ="client")

The errors show as below

GDCdownload(queryDown,method ="client",directory = "/Users/barrywang/Desktop/bigdata/Data/TCGA/GDCdata") Downloading data for project TCGA-LIHC trying URL 'https://gdc.cancer.gov/files/public/file/gdc-client_v1.6.1_OSX_x64.zip' Content type 'application/zip' length 15650334 bytes (14.9 MB)

downloaded 1.8 MB

Error in download.file(url, method = method, ...) : download from 'https://gdc.cancer.gov/files/public/file/gdc-client_v1.6.1_OSX_x64.zip' failed In addition: Warning messages: 1: In download.file(url, method = method, ...) : downloaded length 1931699 != reported length 15650334 2: In download.file(url, method = method, ...) : URL 'https://gdc.cancer.gov/files/public/file/gdc-client_v1.6.1_OSX_x64.zip': Timeout of 60 seconds was reached

Please contact me if you find a solution. THANKS.

tiagochst commented 2 years ago

It looks like the gdc client being downloaded is corrupted for some reason. It is working on my side. What you can do is to download the zip file and uncompress in the folder you are working. This should skip the download step.

tiagochst commented 2 years ago
Screen Shot 2022-06-14 at 11 53 10 AM
BarryWang0905 commented 2 years ago

I had downloaded the zip file and uncompressed in the folder at terminal. and tried to run again, it showed the erroer as below.

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.

So I tred to use method = client , it stills showed error.

GDCdownload(queryDown,method ="client",directory = "/Users/barrywang/Desktop/bigdata/Data/TCGA/GDCdata") Downloading data for project TCGA-LIHC Of the 421 files for download 420 already exist. We will download only those that are missing ones. Error in if (grepl("^https?://", url)) { : argument is of length zero

Also,I tred to set files.per.chunk to a small number problem still occured

GDCdownload(queryDown,method ="api",directory = "/Users/barrywang/Desktop/bigdata/Data/TCGA/GDCdata",files.per.chunk = 10) Downloading data for project TCGA-LIHC Of the 421 files for download 420 already exist. We will download only those that are missing ones. GDCdownload will download: 4.213849 MB Downloading chunk 1 of 1 (1 files, size = 4.213849 MB) as 3b21a0fe-8a3b-4473-8bd1-523ab630dc71.rna_seq.augmented__0.tar_gene_counts.tsv |==============================================================================================================| 100%

At least one of the chunks download was not correct. We will retry Downloading chunk 1 of 1 (1 files, size = 4.213849 MB) as 3b21a0fe-8a3b-4473-8bd1-523ab630dc71.rna_seq.augmented__0.tar_gene_counts.tsv |==============================================================================================================| 100% 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.

tiagochst commented 2 years ago

This issue should have been fixed yesterday. Do you have version 2.25.1 installed?