Skip to content
An R package to compute relationship matrices for diploid and autotetraploid species
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
data Delete snp.table.rdata Jul 9, 2019
inst add dontrun example to pass CRAN time issue Jul 12, 2019
man Update Hmatrix.Rd Jul 23, 2019
vignettes fix notes CRAN Jul 10, 2019
.Rbuildignore add dontrun example to pass CRAN time issue Jul 12, 2019
AGHmatrix.Rproj Merge branch 'master' of Apr 13, 2017
NAMESPACE Add files via upload Jul 9, 2019 Update Jul 10, 2019

Build Status


AGHmatrix is an R package to compute A (pedigree), G (genomic-base), and H (A corrected by G) matrices for diploid and autopolyploid species. It suports any even ploidy.

The following matrices are implemented:

Pedigree-based relationship matrix (A matrix)

Additive Non-Additive
Diploid Henderson (1976) Cockerham (1954)
Polyploid Kerr (2012), Slater (2014)

Molecular-based relationship matrix (G matrix)

Additive Non-Additive
Diploid Yang (2010), VanRaden (2012) Su (2012), Vitezica (2013)
Polyploid Slater (2016), VanRaden (2012) Slater (2016), Endelman (2018)

Combined pedigree and molecular-based relationship matrix (H matrix)

Any Effect
Any Ploidy Munoz (2014), Martini (2018)

An original manuscript about AGHmatrix development and application in autotetraploids is described on Amadeu, R. R., C. Cellon, J. W. Olmstead, A. A. Garcia, M. F. Resende, and P. R. Muñoz, 2016 AGHmatrix: R package to construct relationship matrices for autotetraploid and diploid species: a blueberry example. The Plant Genome 9. doi:10.3835/plantgenome2016.01.0009..

How to install


Within R:


From github (development version)

Within R, you need to install and load the package devtools:


This will allow you to automatically build and install packages from github. If you use Windows, first install Rtools. On a Mac, you will need Xcode (available on the App Store). On Linux, you are good to go.

Then, to install AGHmatrix from github:



You can read the AGHmatrix tutorial going to the vignettes of the installed package, or clicking below. Please, start with the overview, that will guide you through other chapters.

AGHmatrix Tutorial

More about us

Bluberry Breeding & Genomics Lab, University of Florida - USA

Statistical-Genetics Lab, University of Sao Paulo - Brazil


Amadeu, RR, et al., 2016 AGHmatrix: R package to construct relationship matrices for autotetraploid and diploid species: a blueberry example. The Plant Genome 9(4).

Ashraf, BH, et a., 2016 Estimating genomic heritabilities at the level of family-pool samples of perennial ryegrass using genotyping-by-sequencing. Theoretical and Applied Genetics 129: 45-52.

Endelman, JB, et al., 2018. Genetic variance partitioning and genome-wide prediction with allele dosage information in autotetraploid potato. Genetics, 209(1) pp. 77-87.

Hamilton, MG, et al., 2017 Computation of the inverse additive relationship matrix for autopolyploid and multiple-ploidy populations. Theoretical and Applied Genetics.

Henderson, C, 1976 A simple method for computing the inverse of a numerator relationship matrix used in prediction of breeding values. Biometrics pp. 69–83.

Kerr, RJ, et al., 2012 Use of the numerator relation ship matrix in genetic analysis of autopolyploid species. Theoretical and Applied Genetics 124: 1271–1282.

Martini, JW, et al., 2018, The effect of the H$^{1}$ scaling factors $\tau$ and $\omega$ on the structure of H in the single-step procedure. Genetics Selection Evolution, 50(1), 16.

Mrode, R. A., 2014 Linear models for the prediction of animal breeding values. Cabi. 3rd ed.

Munoz, PR, et al., 2014 Unraveling additive from nonadditive effects using genomic relationship matrices. Genetics 198: 1759–1768.

R Core Team, 2016 R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria.

Resende, MF, et al., 2012 Accuracy of genomic selection methods in a standard data set of loblolly pine (Pinus taeda l.). Genetics 190: 1503–1510.

Slater, AT, et al., 2014 Improving the analysis of low heritability complex traits for enhanced genetic gain in potato. Theoretical and applied genetics 127: 809–820.

Slater AT, et al., 2016 Improving genetic gain with genomic selection in autotetraploid potato. The Plant Genome 9.

Su, G, et al., 2012 Estimating additive and non-additive genetic variances and predicting genetic merits using genome-wide dense single nucleotide polymorphism markers. PloS one 7:e45293.

VanRaden, P, 2008 Efficient methods to compute genomic predictions. Journal of dairy science 91: 4414–4423.

Vitezica, ZG, et al., 2013 On the additive and dominant variance and covariance of individuals within the genomic selection scope. Genetics 195: 1223–1230.

Yang, J, et al., 2010 Common snps explain a large proportion of the heritability for human height. Nature genetics 42: 565–569.

You can’t perform that action at this time.