Skip to content

Commit 4075235

Browse files
committed
Fix GDC client downlaod
1 parent b431dc9 commit 4075235

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: TCGAbiolinks
22
Type: Package
33
Title: TCGAbiolinks: An R/Bioconductor package for integrative analysis with GDC data
4-
Version: 2.35.2
4+
Version: 2.35.3
55
Date: 2024-01-01
66
Author: Antonio Colaprico,
77
Tiago Chedraoui Silva,

R/download.R

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,15 +367,21 @@ GDCclientInstall <- function() {
367367
},
368368
error = function(e) {
369369
c(
370-
"https://gdc.cancer.gov/files/public/file/gdc-client_v1.6.1_Ubuntu_x64.zip",
371-
"https://gdc.cancer.gov/files/public/file/gdc-client_v1.6.1_Windows_x64.zip",
372-
"https://gdc.cancer.gov/files/public/file/gdc-client_v1.6.1_OSX_x64.zip"
370+
"https://gdc.cancer.gov/system/files/public/file/gdc-client_2.3_Ubuntu_x64-py3.8-ubuntu-20.04.zip",
371+
"https://gdc.cancer.gov/system/files/public/file/gdc-client_2.3_Windows_x64-py3.8-windows-2019.zip",
372+
"https://gdc.cancer.gov/system/files/public/file/gdc-client_2.3_OSX_x64-py3.8-macos-14.zip"
373373
)
374374
}
375375
)
376376
bin <- links[grep("public.*zip", links)]
377377
if (is.windows()) bin <- bin[grep("client*.*windows", bin, ignore.case = TRUE)]
378-
if (is.mac()) bin <- bin[grep("client*.*OSX", bin)]
378+
if (is.mac()) {
379+
if(Sys.info()["machine"] == "arm64"){
380+
bin <- bin[grep("client*.*OSX.*14", bin)]
381+
} else {
382+
bin <- bin[grep("client*.*OSX.*12", bin)]
383+
}
384+
}
379385
if (is.linux()) {
380386
if (grepl("ubuntu", Sys.info()["version"], ignore.case = TRUE)) {
381387
bin <- bin[grep("client*.*Ubuntu", bin)]
@@ -386,6 +392,9 @@ GDCclientInstall <- function() {
386392
if (is.windows()) mode <- "wb" else mode <- "w"
387393
download(bin, basename(bin), mode = mode)
388394
unzip(basename(bin))
395+
if(is.mac()){
396+
unzip(gsub("-py3.8-macos-14|-py3.8-macos-12","",basename(bin)))
397+
}
389398
Sys.chmod("gdc-client")
390399
return(GDCclientPath())
391400
}

0 commit comments

Comments
 (0)