Learn R Programming

ParentOffspring (version 1.0)

ParentOffspring: Conduct the Parent-Offspring Test Using Monomorphic SNP Markers

Description

Compute the similarity to the parents for each offspring, and produce a plot of similarity for all offspring. One can keep the offspring above some threshold for the similarity for further studies.

Usage

ParentOffspring(genoMat, plot = TRUE)

Arguments

Value

similarityvector of similarity for each offspring

Details

The procedure computes the similarity of each offspring to its parents utilizing the monomorphic markers between two parents. At each SNP marker locus for each offspring, allele calls are scored into 0, 1 or 2 based on the number of identical alleles from both parents. Then the similarity between this offspring and the parents is defined to be $$S=(2a+b)/(2c)$$ where a is the number of 2s, and b is number of 1s and c is the total number of 0s, 1s and 2s for all monomorphic markers between the parents. Missing values are allowed and denoted by " - - " in the input matrix genoMat, but will not be used to compute similarity.

References

Abdel-Haleem, H., Ji, P., Boerma, H. R. and Li, Z. (2013).R Software Program for Conducting Parent-Offspring Test using SNP Markers. To appear in Plant Genome.

Examples

Run this code
# a very simple example

genotypeMatrix = matrix( 
    c("GG",  "GG",   "GG",  "CG",  "CG",  "GG",
      "AA",  "AA",   "AA",  "--",  "AA",  "AA", 
      "AA",  "AA",   "GG",  "AA",  "AA",  "AA", 
      "GG",  "AA",   "GG",  "GG",	 "GG",  "GG"),  
    byrow=TRUE, 
    nrow=4, 
    ncol=6) 
# Compute and plot the parent-offspring similarity for each offspring
ParentOffspring(genotypeMatrix)

Run the code above in your browser using DataLab