Learn R Programming

hsphase (version 3.0.0)

pogc: Parent-Offspring Group Constructor

Description

Assign offspring to parents based on an opposing-homozygotes (OH) matrix.

Usage

pogc(oh, genotypeError)

Value

A data.frame with two columns:

  • animal ID

  • assigned parent ID

Arguments

oh

matrix. Opposing homozygotes matrix (output of ohg).

genotypeError

integer. Number of genotyping errors allowed when interpreting the oh matrix.

See Also

ohg, hss, rpoh

Examples

Run this code
set.seed(1)
chr <- list()
sire <- list()

for(i in 1:5)
{
  chr[[i]] <- .simulateHalfsib(numInd = 20, numSNP = 5000, recbound = 1:10)
  sire[[i]] <- ssp(bmh(chr[[i]]), chr[[i]])
  sire[[i]] <- sire[[i]][1,] + sire[[i]][2,]
  sire[[i]][sire[[i]] == 18] <- 9
}

Genotype <- do.call(rbind, chr)
rownames(Genotype) <- 6:(nrow(Genotype) + 5)
sire <- do.call(rbind, sire)
rownames(sire) <- 1:5
Genotype <- rbind(sire, Genotype)

oh <- ohg(Genotype)
pogc(oh, 5)

Run the code above in your browser using DataLab