rungweis: Routine to run a GWEIS

View source: R/GxEScanR.R

rungweisR Documentation

Routine to run a GWEIS

Description

Routine to run a GWEIS

Usage

rungweis(gweismem, bdinfo, snps, outfilename, maf = 0.01)

Arguments

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.

Value

Called for its side effect of writing tab-delimited results to outfilename. Returns NULL invisibly.

Examples

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

GxEScanR documentation built on May 1, 2026, 5:07 p.m.