| Title: | Run GWAS/GWEIS Scans Using Binary Dosage Files |
|---|---|
| Description: | Tools to run genome-wide association study (GWAS) and genome-wide by environment interaction study (GWEIS) scans using the genetic data stored in a binary dosage file. The user provides a data frame with the subject's covariate data and the information about the binary dosage file returned by the BinaryDosage::getbdinfo() routine. |
| Authors: | John Morrison [aut, cre], W. James Gauderman [aut], NCI [fnd] (CA196559), NCI [fnd] (CA201407), NIEHS [fnd] (ES007048), NHLBI [fnd] (HL115606) |
| Maintainer: | John Morrison <[email protected]> |
| License: | GPL-3 |
| Version: | 3.0.0 |
| Built: | 2026-05-21 10:43:53 UTC |
| Source: | https://github.com/cran/GxEScanR |
Routine to allocate memory needed to perform a GWEIS.
gweis.mem(gemdl, subids, tests, gomdl = NULL)gweis.mem(gemdl, subids, tests, gomdl = NULL)
gemdl |
The results from glm for the gene-environment model. This model contains the outcome and all covariates of interest with the last covariate listed in the model being the covaraiate that the gene interaction is being tested for. |
subids |
A character vector of subject IDs that line up with the data that was used in the models that are passed to this routine |
tests |
The list of tests to perform. These can be any combination of the following values "bg_go", "bg_ge", "bg_gxe", "bgxe", "joint", "bg_eg", "bg_case", "bg_ctrl" |
gomdl |
The results from glm for the gene-only model. This model
contains the outcome and all the covariates except the covariate that
the gene interaction is being tested for. Required (non-NULL) when
|
List containing allocated memory to perform the specified GWEIS.
This value is passed to the rungweis routine. Returns 1 if
any value in tests is not a recognised test name.
## Not run: bdinfo <- BinaryDosage::getbdinfo(system.file("extdata", "gendata.bdose", package = "GxEScanR")) subdata <- readRDS(system.file("extdata", "subdata.rds", package = "GxEScanR")) subdata <- subdata[complete.cases(subdata), ] subdata <- subdata[subdata$subid %in% bdinfo$samples$sid, ] linearmodel <- glm(y_linear ~ x2 + x1, data = subdata) linearmem <- gweis.mem(gemdl = linearmodel, subids = subdata$subid, tests = c("bg_ge", "bg_gxe", "bgxe", "joint")) ## End(Not run)## Not run: bdinfo <- BinaryDosage::getbdinfo(system.file("extdata", "gendata.bdose", package = "GxEScanR")) subdata <- readRDS(system.file("extdata", "subdata.rds", package = "GxEScanR")) subdata <- subdata[complete.cases(subdata), ] subdata <- subdata[subdata$subid %in% bdinfo$samples$sid, ] linearmodel <- glm(y_linear ~ x2 + x1, data = subdata) linearmem <- gweis.mem(gemdl = linearmodel, subids = subdata$subid, tests = c("bg_ge", "bg_gxe", "bgxe", "joint")) ## End(Not run)
Routine to run a GWEIS
rungweis(gweismem, bdinfo, snps, outfilename, maf = 0.01)rungweis(gweismem, bdinfo, snps, outfilename, maf = 0.01)
gweismem |
Models and memory allocated by gweis-mem to run the GWEIS. |
bdinfo |
Information about a Binary Dosage file that contains the genetic data to run the GWEIS |
snps |
List of SNPs in the Binary Dosage file to perform the GWEIS on. |
outfilename |
Name of the file to contain the output |
maf |
Minimum minor allele frequency of SNPs needed to run test on. |
Called for its side effect of writing tab-delimited results to
outfilename. Returns NULL invisibly.
## Not run: bdinfo <- BinaryDosage::getbdinfo(system.file("extdata", "gendata.bdose", package = "GxEScanR")) subdata <- readRDS(system.file("extdata", "subdata.rds", package = "GxEScanR")) subdata <- subdata[complete.cases(subdata), ] subdata <- subdata[subdata$subid %in% bdinfo$samples$sid, ] linearmodel <- glm(y_linear ~ x2 + x1, data = subdata) linearmem <- gweis.mem(gemdl = linearmodel, subids = subdata$subid, tests = c("bg_ge", "bgxe", "joint")) outfile <- tempfile(fileext = ".txt") rungweis(gweismem = linearmem, bdinfo = bdinfo, snps = 1:nrow(bdinfo$snps), outfilename = outfile) ## End(Not run)## Not run: bdinfo <- BinaryDosage::getbdinfo(system.file("extdata", "gendata.bdose", package = "GxEScanR")) subdata <- readRDS(system.file("extdata", "subdata.rds", package = "GxEScanR")) subdata <- subdata[complete.cases(subdata), ] subdata <- subdata[subdata$subid %in% bdinfo$samples$sid, ] linearmodel <- glm(y_linear ~ x2 + x1, data = subdata) linearmem <- gweis.mem(gemdl = linearmodel, subids = subdata$subid, tests = c("bg_ge", "bgxe", "joint")) outfile <- tempfile(fileext = ".txt") rungweis(gweismem = linearmem, bdinfo = bdinfo, snps = 1:nrow(bdinfo$snps), outfilename = outfile) ## End(Not run)