gwsem (version 0.1.5)

GWAS: Run a genome-wide association study (GWAS) using the provided model

Description

Adds a compute plan returned by prepareComputePlan to the provided model and runs it. Once analyses are complete, load your aggregated results with loadResults.

Usage

GWAS(model, snpData, out = "out.log", ..., SNP = NULL,
  startFrom = 1L)

Arguments

model

an instance of MxModel

snpData

the name of the file where the SNP data is stored

out

the filename where the results of fitted models shall be written

...

Not used. Forces remaining arguments to be specified by name.

SNP

a vector of SNP indices to include in the analysis; NULL is interpreted as all available SNPs

startFrom

the index to start from when SNP=NULL

Value

The MxModel returned by mxRun. Data and estimates for the last SNP processed will be available for inspection.

Examples

Run this code
# NOT RUN {
dir <- system.file("extdata", package = "gwsem")
pheno <- data.frame(anxiety=rnorm(500))
m1 <- buildOneItem(pheno, 'anxiety')
GWAS(m1, file.path(dir,"example.pgen"),
     file.path(tempdir(),"out.log"))
# }

Run the code above in your browser using DataLab