Learn R Programming

qgg (version 1.1.1)

gscore: Genomic scoring based on single marker summary statistics

Description

The gscore function is used for genomic predictions based on single marker summary statistics (coefficients, log-odds ratios, z-scores) and observed genotypes.

Usage

gscore(
  Glist = NULL,
  chr = NULL,
  bedfiles = NULL,
  bimfiles = NULL,
  famfiles = NULL,
  stat = NULL,
  fit = NULL,
  ids = NULL,
  scale = TRUE,
  impute = TRUE,
  msize = 100,
  ncores = 1,
  verbose = FALSE
)

Arguments

Glist

list of information about genotype matrix

chr

chromosome for which genomic scores is computed

bedfiles

name of the PLINK bed-files

bimfiles

name of the PLINK bim-files

famfiles

name of the PLINK fam-files

stat

matrix of single marker effects

fit

fit object output from gbayes

ids

vector of individuals used in the analysis

scale

logical if TRUE the genotype markers have been scale to mean zero and variance one

impute

logical if TRUE missing genotypes are set to its expected value (2*af where af is allele frequency)

msize

number of genotype markers used for batch processing

ncores

number of cores used in the analysis

verbose

is a logical; if TRUE it prints more details during optimization

Author

Peter Soerensen

Examples

Run this code

 ## 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)
 

Run the code above in your browser using DataLab