Description Usage Arguments Value Examples
This function runs the BLUP|GA method where SNPs with the greatest squared effect size are weighted in the GRM prior to GBLUP.
1 2 | blupga_EFF(G, phenodata, valset = NULL, genomat, bsq, perc, flank = TRUE,
verbose = TRUE)
|
G |
G-matrix constructed using all available SNPs and samples Defaults to NULL. |
phenodata |
data frame with 2 columns. One col must be named 'ID' and contain sample IDs. Another column must be named 'y' and contain the phenotypes. Defaults to NULL. |
valset |
vector of indices that defines which rows in |
genomat |
matrix of genotypes in -1,0,1 format (i.e. 0 is heterozygous, 1 and -1 are opposing homozygous states). |
bsq |
vector of squared marker effects the same length as the number of SNPs in genomat. Can be obtained with |
perc |
proportion of SNPs to be weighted (between 0 and 1), where 0.05 means the top 5 percent of SNPs will be weighted. Defaults to NULL. |
flank |
choose to include the immediate SNPs to the left and right of a top 'perc' SNP. Defaults to TRUE. |
verbose |
just leave this for now! |
A data frame containing the correlation between the predicted phenotype and the true phenotype of the individuals in the valset
.
Since BLUP|GA is run for each value of omega (W) from 0.0 to 1.0 in increments of 0.10, each row of the returned data frame contains the cross-validation correlation at one value of omega (W). This allows the user to find the value of W at which the predictive ability (COR) is maximised.
omega weighting for selected SNPS in candidate genes (0.0–1.0)
cross validation predictive ability (0.0–1.0)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # get example genotype matrix and phenotype data
data(M)
data(pheno)
# choose a validation set of 20 random individuals
val <- sample(1:nrow(pheno), 20)
# Run a GWAS to estimate squared SNP effects for all SNPs.
# By calling est_SNPeffects() this process will be done using the individuals NOT in your 'val' set.
# Of course you can use your own method to generate the full vector of SNP effects using a training set of individuals.
bsq <- est_SNPeffects(pheno, M, val)
# make a standard GRM for all SNPs
G <- make_GRM(M)
# run BLUPGA where the top 1 percent of SNPs (according to effect size) are weighted
results <- blupga_EFF(G, pheno, val, M, bsq, 0.01, flank=FALSE)
# run BLUPGA where the top 0.1 percent of SNPs (according to effect size) are weighted and
# SNPs immediately upstream and downstream of those top SNPs are also weighted.
results <- blupga_EFF(G, pheno, val, M, bsq, 0.001, flank=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.