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