pullIbdHaplo {AlphaSimR} | R Documentation |
Retrieves Identity By Descent (IBD) haplotype data
pullIbdHaplo(pop = NULL, chr = NULL, snpChip = NULL, pedigree = NULL, simParam = NULL)
pop |
an object of |
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 |
an object of |
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.
#Create founder haplotypes founderPop = quickHaplo(nInd=10, nChr=1, segSites=10) #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)