addSegSite {AlphaSimR}R Documentation

Add segregating site to MapPop

Description

This function allows for adding a new segregating site with user supplied genotypes to a MapPop. The position of the site is set using a genetic map position.

Usage

addSegSite(mapPop, siteName, chr, mapPos, haplo)

Arguments

mapPop

an object of MapPop-class

siteName

name to give the segregating site

chr

which chromosome to add the site

mapPos

genetic map position of site in Morgans

haplo

haplotypes for the site

Value

an object of MapPop-class

Examples

# Creates a populations of 10 outbred individuals
# Their genome consists of 1 chromosome and 2 segregating sites
founderPop = quickHaplo(nInd=10,nChr=1,segSites=2)

# Add a locus a the 0.5 Morgan map position
haplo = matrix(sample(x=0:1, size=20, replace=TRUE), ncol=1)

founderPop2 = addSegSite(founderPop, siteName="x", chr=1, mapPos=0.5, haplo=haplo)

pullSegSiteHaplo(founderPop2)


[Package AlphaSimR version 1.5.3 Index]