Closed znayema closed 2 months ago
These aren't particularly large files; this should take less than 60 sec to download.
You can set options(timeout = 1000)
and try again (maybe you'll need to delete partially downloaded files first).
Another possible issue is that downloads are blocked on your server. And you should ask someone to download this file for you.
Any update on this?
Hi privefl,
I encountered the same bug. Here's the error message, and options(timeout = 1000) is not work.
Error in utils::download.file(url, destfile = chain, quiet = TRUE) :
cannot open URL 'ftp://hgdownload.cse.ucsc.edu/goldenPath/hg38/liftOver/hg38ToHg19.over.chain.gz'
In addition: Warning message:
In utils::download.file(url, destfile = chain, quiet = TRUE) :
URL 'ftp://hgdownload.cse.ucsc.edu/goldenPath/hg38/liftOver/hg38ToHg19.over.chain.gz': Timeout of 60 seconds was reached
modi_df = snp_modifyBuild(
+ df,
+ "/home/liulab/GeneTools/PLINK/liftOver",
+ from = "hg38",
+ to = "hg19",
+ check_reverse = TRUE
+ )
Error in utils::download.file(url, destfile = chain, quiet = TRUE) :
cannot open URL 'ftp://hgdownload.cse.ucsc.edu/goldenPath/hg38/liftOver/hg38ToHg19.over.chain.gz'
In addition: Warning message:
In utils::download.file(url, destfile = chain, quiet = TRUE) :
URL 'ftp://hgdownload.cse.ucsc.edu/goldenPath/hg38/liftOver/hg38ToHg19.over.chain.gz': Timeout of 1000 seconds was reached
It appears that the URL needs to be updated. File : bigsnpr / R / modify-positions.R On line 47, the URL is constructed as follows:
url <- paste0("ftp://hgdownload.cse.ucsc.edu/goldenPath/", from, "/liftOver/",
The new download URL should be:
https://hgdownload.soe.ucsc.edu/goldenPath/hg38/liftOver/hg38ToHg19.over.chain.gz
Or can you add a parameter to enable the utilization of a local chain file? Thanks for the tool , hope it helps.
Thanks for reporting.
So, just changing soe
to cse
?
The local file is probably a good idea too. Would you like to submit a PR for both of these?
Thanks Hugolyu and Privelf, my problem is fixed
Note that this has been added in v1.12.9:
local_chain
as a vector of two, for when using check_reverse
base_url
from where to download the chain filesThank you for the updates
From: Florian Privé @.> Sent: Wednesday, May 15, 2024 3:49 AM To: privefl/bigsnpr @.> Cc: Nayema, Zannatun @.>; Author @.> Subject: Re: [privefl/bigsnpr] Getting this error while trying to convert from hg19 to hg38 (Issue #491)
Note that this has been added in v1.12.9:
— Reply to this email directly, view it on GitHubhttps://github.com/privefl/bigsnpr/issues/491#issuecomment-2111815706, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BDZ3U4ACPELCPTRIKGX4ZBDZCMHSNAVCNFSM6AAAAABF62SF22VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJRHAYTKNZQGY. You are receiving this because you authored the thread.Message ID: @.***>
my code
lifted <- snp_modifyBuild(data, "/work/larylab/NAYEMA/liftover/liftOver", from = "hg19", to = "hg38", check_reverse = TRUE)
Error in utils::download.file(url, destfile = chain, quiet = TRUE) : cannot open URL 'ftp://hgdownload.cse.ucsc.edu/goldenPath/hg19/liftOver/hg19ToHg38.over.chain.gz' In addition: Warning message: In utils::download.file(url, destfile = chain, quiet = TRUE) : URL 'ftp://hgdownload.cse.ucsc.edu/goldenPath/hg19/liftOver/hg19ToHg38.over.chain.gz': Timeout of 60 seconds was reached