Computes genomic predictions using single marker summary statistics and observed genotypes.
Usage
gscore(
Glist = NULL,
chr = NULL,
bedfiles = NULL,
bimfiles = NULL,
famfiles = NULL,
stat = NULL,
fit = NULL,
ids = NULL,
scaleMarker = TRUE,
scaleGRS = TRUE,
impute = TRUE,
msize = 100,
ncores = 1,
verbose = FALSE
)
Arguments
- Glist
List of information about genotype matrix. Default is NULL.
- chr
Chromosome for which genomic scores is computed. Default is NULL.
- bedfiles
Names of the PLINK bed-files. Default is NULL.
- bimfiles
Names of the PLINK bim-files. Default is NULL.
- famfiles
Names of the PLINK fam-files. Default is NULL.
- stat
Matrix of single marker effects. Default is NULL.
- fit
Fit object output from gbayes. Default is NULL.
- ids
Vector of individuals used in the analysis. Default is NULL.
- scaleMarker
Logical; if TRUE the genotype markers are scaled to mean zero and variance one. Default is TRUE.
- scaleGRS
Logical; if TRUE the GRS are scaled to mean zero and variance one. Default is TRUE.
- impute
Logical; if TRUE, missing genotypes are set to its expected value (2*af where af is allele frequency). Default is TRUE.
- msize
Number of genotype markers used for batch processing. Default is 100.
- ncores
Number of cores used in the analysis. Default is 1.
- verbose
Logical; if TRUE, more details are printed during optimization. Default is FALSE.
Examples
## Plink bed/bim/fam files
bedfiles <- system.file("extdata", paste0("sample_chr",1:2,".bed"), package = "qgg")
bimfiles <- system.file("extdata", paste0("sample_chr",1:2,".bim"), package = "qgg")
famfiles <- system.file("extdata", paste0("sample_chr",1:2,".fam"), package = "qgg")
# Summarize bed/bim/fam files
Glist <- gprep(study="Example", bedfiles=bedfiles, bimfiles=bimfiles, famfiles=famfiles)
# Simulate phenotype
sim <- gsim(Glist=Glist, chr=1, nt=1)
# Compute single marker summary statistics
stat <- glma(y=sim$y, Glist=Glist, scale=FALSE)
# Compute genomic scores
gsc <- gscore(Glist = Glist, stat = stat)