Skip to contents

Retrieves the genetic map for a given SNP chip.

Usage

getSnpMap(snpChip = 1, sex = "A", simParam = NULL)

Arguments

snpChip

an integer. Indicates which SNP chip's map to retrieve.

sex

determines which sex specific map is returned. Options are "A" for average map, "F" for female map, and "M" for male map. All options are equivalent if not using sex specific maps.

simParam

an object of class SimParam. If NULL, the function uses the object named SP from the global environment.

Value

Returns a data.frame with:

id

Unique identifier for the SNP

chr

Chromosome containing the SNP

site

Segregating site on the chromosome

pos

Genetic map position

Examples

#Create founder haplotypes
founderPop = quickHaplo(nInd=10, nChr=1, segSites=10)

#Set simulation parameters
SP = SimParam$new(founderPop)
SP$addSnpChip(5)

#Pull SNP map
getSnpMap(snpChip=1, simParam=SP)
#>        id chr site       pos
#> 1_3   1_3   1    3 0.2222222
#> 1_4   1_4   1    4 0.3333333
#> 1_6   1_6   1    6 0.5555556
#> 1_8   1_8   1    8 0.7777778
#> 1_10 1_10   1   10 1.0000000