Modify the physical position information of a data frame when converting genome build using executable liftOver.
snp_modifyBuild(
info_snp,
liftOver,
from = "hg18",
to = "hg19",
check_reverse = TRUE,
local_chain = NULL,
base_url = "https://hgdownload.soe.ucsc.edu/goldenPath/"
)
Input data frame info_snp
with column "pos" in the new build.
A data frame with columns "chr" and "pos".
Path to liftOver executable. Binaries can be downloaded at https://hgdownload.cse.ucsc.edu/admin/exe/macOSX.x86_64/liftOver for Mac and at https://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/liftOver for Linux.
Genome build to convert from. Default is hg18
.
Genome build to convert to. Default is hg19
.
Whether to discard positions for which we cannot go back
to initial values by doing 'from -> to -> from'. Default is TRUE
.
Local chain file (e.g. hg18ToHg19.over.chain.gz
) to use
instead of downloading one from parameters from
and to
(the default).
You can download one such file from e.g.
https://hgdownload.soe.ucsc.edu/goldenPath/hg18/liftOver/.
Provide a vector of two when using check_reverse
.
From where to download the chain files. Default is
"https://hgdownload.soe.ucsc.edu/goldenPath/"
. You can also try
replacing https
by http
, and/or soe
by cse
.
Hinrichs, Angela S., et al. "The UCSC genome browser database: update 2006." Nucleic acids research 34.suppl_1 (2006): D590-D598.