This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Converting genome build from hg38 to hg19 using liftOver via bigsnpr - error fetching file

I am trying to use LiftOver via bigsnpr to change genome coordinates from hg38 to hg19.

I have tried the following:

hg19 <- snp_modifyBuild(
  info_snp,
  "/pathtoexecutable/liftOver",
  from = "hg38",
  to = "hg19",
  check_reverse = TRUE
)

I have received the following error message:

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'

I have downloaded the hg19ToHg38.over.chain.gz file locally, and I would like to provide the path to it rather than attempting to download and generating the error message. snp_modifyBuild does not have an argument (that I am able to identify) to allow me to do this. Any tips or ideas for a workaround would be greatly appreciated.

Thank you!

snp bigsnpr liftover r

2 answers

Replace ftp:// with https://

Seems to be an issue on bigsnpr's end. Recent update should allow to specify chain file download location:

https://github.com/privefl/bigsnpr/issues/491

Log in to answer this question.