% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/GxEScanR.R
\name{rungweis}
\alias{rungweis}
\title{Routine to run a GWEIS}
\usage{
rungweis(gweismem, bdinfo, snps, outfilename, maf = 0.01)
}
\arguments{
\item{gweismem}{Models and memory allocated by gweis-mem to run the GWEIS.}

\item{bdinfo}{Information about a Binary Dosage file that contains the
genetic data to run the GWEIS}

\item{snps}{List of SNPs in the Binary Dosage file to perform the GWEIS on.}

\item{outfilename}{Name of the file to contain the output}

\item{maf}{Minimum minor allele frequency of SNPs needed to run test on.}
}
\value{
Called for its side effect of writing tab-delimited results to
\code{outfilename}. Returns \code{NULL} invisibly.
}
\description{
Routine to run a GWEIS
}
\examples{
\dontrun{
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)
}
}
