Learn R Programming

AlphaSimR (version 0.8.2)

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 SimParam_setTrackPed), 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.