Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

pullIbdHaplo

Pull Identity By Descent (IBD) haplotypes


Description

Retrieves Identity By Descent (IBD) haplotype data

Usage

pullIbdHaplo(
  pop = NULL,
  chr = NULL,
  snpChip = NULL,
  pedigree = NULL,
  simParam = NULL
)

Arguments

pop

an object of Pop-class or RawPop-class. If NULL, haplotypes for the whole ancestral pedigree are retreived. Otherwise, haplotypes just for the pop individuals are retreived. In both cases the base population is controlled by pedigree.

chr

a vector of chromosomes to retrieve. If NULL, all chromosomes are retrieved.

snpChip

an integer. Indicates which SNP array loci are retrieved. If NULL, all sites are retrieved.

pedigree

a matrix with ancestral pedigree to set a base population. It should be of the same form as simParam$pedigree (see setTrackPed in SimParam), i.e., two columns (mother and father) and the same number of rows as simParam$pedigree.Base population can be set by setting parents as 0. If NULL, pedigree from SimParam is taken.

simParam

an object of SimParam

Value

Returns a matrix of haplotypes with Identity By Descent (IBD) coding of locus alleles. The matrix colnames reflect whether all segregagting loci (sites) are retreived or only SNP array loci.

Examples

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

#Set simulation parameters
SP = SimParam$new(founderPop)
SP$addTraitA(10)
SP$addSnpChip(5)
SP$setTrackRec(TRUE)

#Create population
pop = newPop(founderPop, simParam=SP)
pullIbdHaplo(pop, simParam=SP)

AlphaSimR

Breeding Program Simulations

v0.13.0
MIT + file LICENSE
Authors
Chris Gaynor [aut, cre] (<https://orcid.org/0000-0003-0558-6656>), Gregor Gorjanc [aut] (<https://orcid.org/0000-0001-8008-2787>), John Hickey [aut] (<https://orcid.org/0000-0001-5675-3974>), Daniel Money [ctb] (<https://orcid.org/0000-0001-5151-3648>), David Wilson [ctb]
Initial release
2020-10-20

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.