Skip to content

Genomic prediction cross-validation using penalised, Bayesian and mixed linear models

License

Notifications You must be signed in to change notification settings

jeffersonfparil/gp

Repository files navigation

gp

Genomic prediction cross-validation using penalised, Bayesian and mixed linear models

Build Status License
License: GPL v3

A streamlined interface to calculate the breeding values of entries in breeding trials.

Installation

devtools::install_github("jeffersonfparil/gp")

Architecture

R/
└── main.R
    ├── io.R
    ├── distances.R
    └── cross_validation.R
        └── models.R
            └── metrics.R
  1. main.R - main function
  2. io.R - input, output, filtering, and simulation
  3. distances.R - genetic relationship, distance matrices and their inverses
  4. cross_validation.R - k-fold cross validation within and across populations, pairwise-cross-validation, and leave-one-population-out cross-validation
  5. models.R - genomic prediction models with the consistent signatures
  6. metrics.R - genomic prediction accuracy metrics

Models

  1. Ridge (a.k.a. GBLUP): $Cost_{ridge} = \Sigma(y - X\beta)^2 + \lambda\Sigma\beta^2$, where $\hat{\beta} = {(X^TX + \lambda I)^{-1} X^Ty}$
  2. Lasso: $Cost_{lasso} = \Sigma(y - X\beta)^2 + \lambda\Sigma|\beta|$
  3. Elastic net: $Cost_{ridge} = \Sigma(y - X\beta)^2 + (1-\alpha)\lambda\Sigma\beta^2 + \alpha\lambda\Sigma|\beta|$
  4. Bayes A: scaled t-distributed effects
  5. Bayes B: scaled t-distributed effects with probability $\pi$; and zero effects with probability $1-\pi$, where $\pi \sim \beta(\theta_1, \theta_2)$.
  6. Bayes C: normally distributed effects ($N(0, \sigma^2_{\beta})$) with probability $\pi$; and zero effects with probability $1-\pi$, where $\pi \sim \beta(\theta_1, \theta_2)$.
  7. gBLUP: genotype best linear unbiased prediction (gBLUP) using genomic relationship matrix to predict missing breeding values via Direct-Inversion Newton-Raphson or Average Information (via the sommer R package).

Documentation and links to function-specific dodumentation

?gp::gp

Unit tests

With Nix: nix-shell --run bash --pure. With Conda: conda env create -f conda.yml.

devtools::test()

Or check the entire library:

devtools::check()

About

Genomic prediction cross-validation using penalised, Bayesian and mixed linear models

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published