This function uses linear interpolation, whereas snp_asGeneticPos()
uses
nearest neighbors.
download_genetic_map(
type = c("hg19_OMNI", "hg19_hapmap", "hg38_price"),
dir,
ncores = 1
)
snp_asGeneticPos2(infos.chr, infos.pos, genetic_map)
Which genetic map to download.
Directory where to download and decompress files.
Number of cores used. Default doesn't use parallelism.
You may use bigstatsr::nb_cores()
.
Vector of integers specifying each SNP's chromosome.
Typically <bigSNP>$map$chromosome
.
Vector of integers specifying the physical position
on a chromosome (in base pairs) of each SNP.
Typically <bigSNP>$map$physical.pos
.
A data frame with 3 columns: chr
, pos
, and pos_cM
.
You can get it using download_genetic_map()
.
A data frame with 3 columns: chr
, pos
, and pos_cM
.
The new vector of genetic positions.
The hg19 genetic maps are downloaded from
https://github.com/joepickrell/1000-genomes-genetic-maps/
while the hg38 one is downloaded from
https://alkesgroup.broadinstitute.org/Eagle/downloads/tables/
.