Skip to content

Commit

Permalink
Merge pull request #13 from large-scale-gxe-methods/dev
Browse files Browse the repository at this point in the history
v1.3.1
  • Loading branch information
hanchenphd authored Oct 13, 2023
2 parents a5d6003 + 06c4a7f commit 7d61b0c
Show file tree
Hide file tree
Showing 16 changed files with 78 additions and 45 deletions.
10 changes: 5 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: MAGEE
Version: 1.3.0
Date: 2023-04-18
Version: 1.3.1
Date: 2023-10-12
Title: Mixed Model Association Test for GEne-Environment Interaction
Authors@R: c(person("Xinyu", "Wang", role = "aut", email = "[email protected]"),
person("Han", "Chen", role = c("aut", "cre"), email = "[email protected]"),
Expand All @@ -13,9 +13,9 @@ Authors@R: c(person("Xinyu", "Wang", role = "aut", email = "[email protected]
Description: Use a 'glmmkin' class object (GMMAT package) from the null model to perform generalized linear mixed model-based single-variant and variant set main effect tests, gene-environment interaction tests, and joint tests for association, as proposed in Wang et al. (2020) <DOI:10.1002/gepi.22351>.
License: GPL (>= 3)
Copyright: See COPYRIGHTS for details.
Imports: Rcpp, Matrix, parallel, MASS, SeqArray, SeqVarTools, foreach,
GMMAT, CompQuadForm, data.table
Suggests: doMC, testthat
Imports: Rcpp, Matrix, parallel, MASS, foreach, GMMAT, CompQuadForm,
data.table
Suggests: doMC, SeqArray, SeqVarTools, testthat
LinkingTo: Rcpp, RcppArmadillo
Encoding: UTF-8
Depends: R (>= 3.2.0)
Expand Down
2 changes: 0 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ importFrom("stats", "as.formula", "binomial", "dbeta", "glm", "model.frame",
importFrom("utils", "read.table", "write.table")
importFrom("CompQuadForm", "davies", "liu")
importFrom("data.table", "fread")
importFrom("SeqArray", "seqOpen", "seqGetData", "seqClose", "seqSetFilter")
importFrom("SeqVarTools", "missingGenotypeRate", "alleleFrequency", "altDosage")
importFrom("GMMAT", "glmmkin", "glmm.score", "SMMAT")
useDynLib(MAGEE, .registration = TRUE, .fixes = "C_")
export(MAGEE, glmm.gei, MAGEE.prep, MAGEE.lowmem, MAGEE.meta, glmm.gei.meta)
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ See Section 3.2 of the <a href="https://github.com/large-scale-gxe-methods/MAGEE
For optimal computational performance, it is recommended to use an R version configured with the Intel Math Kernel Library (or other fast BLAS/LAPACK libraries). See the <a href="https://www.intel.com/content/www/us/en/developer/articles/technical/using-onemkl-with-r.html">instructions</a> on building R with Intel MKL.

## Version
The current version is 1.3.0 (April 18, 2023).
The current version is 1.3.1 (October 12, 2023).

## License
This software is licensed under GPL (>= 3).
Expand All @@ -25,5 +25,6 @@ This work was supported by National Institutes of Health (NIH) grants R00 HL1305

## References
<p>Please cite
<li>Wang X, Lim E, Liu C, Sung YJ, Rao DC, Morrison AC, Boerwinkle E, Manning AK, Chen H. (2020) Efficient gene-environment interaction tests for large biobank-scale sequencing studies. <em>Genetic Epidemiology</em> <b>44(8):</b> 908-923. DOI: <a href="https://doi.org/10.1002/gepi.22351">10.1002/gepi.22351</a>.</li></p>

<li>Wang X, Lim E, Liu C, Sung YJ, Rao DC, Morrison AC, Boerwinkle E, Manning AK, Chen H. (2020) Efficient gene-environment interaction tests for large biobank-scale sequencing studies. <em>Genetic Epidemiology</em> <b>44(8):</b> 908-923. PMID: <a href="https://www.ncbi.nlm.nih.gov/pubmed/32864785">32864785</a>. PMCID: <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7754763/">PMC7754763</a>. DOI: <a href="https://doi.org/10.1002/gepi.22351">10.1002/gepi.22351</a>.</li></p>
<p>If you use MAGEE meta-analysis, please also cite
<li>Wang X, Pham DT, Westerman KE, Pan C, Manning AK, Chen H. (2022) Genomic summary statistics and meta-analysis for set-based gene-environment interaction tests in large-scale sequencing studies. <em>medRxiv</em> 2022.05.08.22274819. DOI: <a href="https://doi.org/10.1101/2022.05.08.22274819">https://doi.org/10.1101/2022.05.08.22274819</a>.</li></p>
Binary file modified build/vignette.rds
Binary file not shown.
Binary file modified data/example.rda
Binary file not shown.
1 change: 0 additions & 1 deletion inst/doc/MAGEE.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
###################################################
### code chunk number 8: MAGEEgeigds (eval = FALSE)
###################################################
## outfile <- tempfile()
## infile1 <- system.file("extdata", "meta1.txt", package = "MAGEE")
## infile2 <- system.file("extdata", "meta2.txt", package = "MAGEE")
## infile3 <- system.file("extdata", "meta3.txt", package = "MAGEE")
Expand Down
12 changes: 8 additions & 4 deletions inst/doc/MAGEE.Rnw
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ morekeywords={}

\begin{document}
\SweaveOpts{concordance=TRUE}
\title{MAGEE: Mixed Model Association Test for GEne-Environment Interaction\\Version 1.3.0}
\date{April 18, 2023}
\title{MAGEE: Mixed Model Association Test for GEne-Environment Interaction\\Version 1.3.1}
\date{October 12, 2023}
\author{Xinyu Wang\\Human Genetics Center\\Dept. of Biostatistics and Data Science\\School of Public Health\\The University of Texas Health Science Center at Houston\\Email: [email protected]\\\\Han Chen\\Human Genetics Center\\Dept. of Epidemiology, Human Genetics and Environmental Sciences\\School of Public Health\\Center for Precision Health\\School of Biomedical Informatics\\The University of Texas Health Science Center at Houston\\Email: [email protected]\\\\Duy Pham\\Human Genetics Center\\Dept. of Epidemiology, Human Genetics and Environmental Sciences\\School of Public Health\\The University of Texas Health Science Center at Houston\\Email: [email protected]\\\\Kenneth Westerman\\Department of Medicine\\Clinical and Translational Epidemiology Unit\\Mongan Institute\\Massachusetts General Hospital\\Email: [email protected]\\\\Cong Pan\\Human Genetics Center\\Dept. of Epidemiology, Human Genetics and Environmental Sciences\\School of Public Health\\The University of Texas Health Science Center at Houston\\Email: [email protected]}

\maketitle
Expand Down Expand Up @@ -82,7 +82,7 @@ Note: The main effect variance component test (MV) in \textit{MAGEE} is the same
\textit{MAGEE} is an open source project and is freely available for download at \url{https://github.com/xwang21/MAGEE}. It can also be found as a regular R package and downloaded from CRAN (\url{https://CRAN.R-project.org/package=MAGEE}).

\subsection{Installing \textit{MAGEE}}
The following R packages are required before installing \textit{MAGEE}: \href{https://cran.r-project.org/web/packages/Rcpp/index.html}{Rcpp} and \href{https://cran.r-project.org/web/packages/RcppArmadillo/index.html}{RcppArmadillo} for R and C++ integration and \href{https://cran.r-project.org/web/packages/testthat/index.html}{testthat} to run code checks during development. Additionally, \textit{MAGEE} imports from \href{https://cran.r-project.org/web/packages/Rcpp/index.html}{Rcpp}, \href{https://cran.r-project.org/web/packages/CompQuadForm/index.html}{CompQuadForm}, \href{https://cran.r-project.org/web/packages/foreach/index.html}{foreach}, \href{https://cran.r-project.org/web/views/HighPerformanceComputing.html}{parallel}, \href{https://cran.r-project.org/web/packages/Matrix/index.html}{Matrix}, methods, \href{https://cran.r-project.org/web/packages/GMMAT/index.html}{GMMAT}, \href{https://cran.r-project.org/web/packages/data.table/index.html}{data.table}, and Bioconductor packages \href{http://bioconductor.org/packages/release/bioc/html/SeqArray.html}{SeqArray} and \href{http://bioconductor.org/packages/release/bioc/html/SeqVarTools.html}{SeqVarTools}. The R package \href{https://cran.r-project.org/web/packages/doMC/index.html}{doMC} is required to run parallel computing in \textbf{glmm.gei} and \textbf{MAGEE} (\href{https://cran.r-project.org/web/packages/doMC/index.html}{doMC} is not available on Windows and these functions will switch to a single compute thread).
\textit{MAGEE} links to R packages \href{https://cran.r-project.org/web/packages/Rcpp/index.html}{Rcpp} and \href{https://cran.r-project.org/web/packages/RcppArmadillo/index.html}{RcppArmadillo}, and also imports R packages \href{https://cran.r-project.org/web/packages/Rcpp/index.html}{Rcpp}, \href{https://cran.r-project.org/web/packages/CompQuadForm/index.html}{CompQuadForm}, \href{https://cran.r-project.org/web/packages/foreach/index.html}{foreach}, \href{https://cran.r-project.org/web/views/HighPerformanceComputing.html}{parallel}, \href{https://cran.r-project.org/web/packages/Matrix/index.html}{Matrix}, methods, \href{https://cran.r-project.org/web/packages/GMMAT/index.html}{GMMAT}, \href{https://cran.r-project.org/web/packages/data.table/index.html}{data.table}. \textit{MAGEE} requires Bioconductor packages \href{http://bioconductor.org/packages/release/bioc/html/SeqArray.html}{SeqArray} and \href{http://bioconductor.org/packages/release/bioc/html/SeqVarTools.html}{SeqVarTools} to work with genotype files in the GDS format. In addition, \textit{GMMAT} requires \href{https://cran.r-project.org/web/packages/testthat/index.html}{testthat} to run code checks during development, and \href{https://cran.r-project.org/web/packages/doMC/index.html}{doMC} to run parallel computing in \textbf{glmm.gei} and \textbf{MAGEE} for genotype files in the GDS format (however, \href{https://cran.r-project.org/web/packages/doMC/index.html}{doMC} is not available on Windows and these functions will switch to a single thread). These dependencies should be installed before installing \textit{MAGEE}.

For optimal computational performance, it is recommended to use an R version configured with the Intel Math Kernel Library (or other fast BLAS/LAPACK libraries). See the instructions on building R with Intel MKL (\url{https://software.intel.com/en-us/articles/using-intel-mkl-with-r}).

Expand Down Expand Up @@ -168,7 +168,6 @@ glmm.gei(model0, interaction='sex', geno.file = infile,
The function \textbf{glmm.gei} returns no value for GDS and BGEN genotype files.
\subsubsection{meta-analysis}
<<MAGEEgeigds, eval=FALSE, echo=TRUE>>=
outfile <- tempfile()
infile1 <- system.file("extdata", "meta1.txt", package = "MAGEE")
infile2 <- system.file("extdata", "meta2.txt", package = "MAGEE")
infile3 <- system.file("extdata", "meta3.txt", package = "MAGEE")
Expand Down Expand Up @@ -475,6 +474,11 @@ Initial public release of \textit{MAGEE}.
\item Minor changes in the man directory, per CRAN policy.
\end{enumerate}

\subsection{Version 1.3.1 (October 12, 2023)}
\begin{enumerate}
\item Bioconductor packages \textbf{SeqArray} and \textbf{SeqVarTools} moved to Suggests.
\end{enumerate}

\section{Contact}
Please refer to the R help document of \textit{MAGEE} for specific questions about each function. For comments, suggestions, bug reports and questions, please contact Han Chen ([email protected]). For bug reports, please include an example to reproduce the problem without having to access your confidential data.

Expand Down
Binary file modified inst/doc/MAGEE.pdf
Binary file not shown.
4 changes: 2 additions & 2 deletions man/MAGEE-package.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ An R package for performing generalized linear mixed model-based single-variant
\tabular{ll}{
Package: \tab MAGEE\cr
Type: \tab Package\cr
Version: \tab 1.3.0\cr
Date: \tab 2023-04-18\cr
Version: \tab 1.3.1\cr
Date: \tab 2023-10-12\cr
License: \tab GPL (>= 3)\cr
}
}
Expand Down
21 changes: 12 additions & 9 deletions man/MAGEE.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -155,16 +155,19 @@ Xinyu Wang, Han Chen, Duy Pham
}
\examples{
\donttest{
library(GMMAT)
data(example)
attach(example)
model0 <- glmmkin(disease ~ age + sex, data = pheno, kins = GRM,
if(requireNamespace("SeqArray", quietly = TRUE) && requireNamespace("SeqVarTools",
quietly = TRUE)) {
library(GMMAT)
data(example)
attach(example)
model0 <- glmmkin(disease ~ age + sex, data = pheno, kins = GRM,
id = "id", family = binomial(link = "logit"))
geno.file <- system.file("extdata", "geno.gds", package = "MAGEE")
group.file <- system.file("extdata", "SetID.withweights.txt", package = "MAGEE")
out <- MAGEE(model0, interaction='sex', geno.file, group.file, group.file.sep = "\t",
tests=c("JV", "JF", "JD"))
print(out)
geno.file <- system.file("extdata", "geno.gds", package = "MAGEE")
group.file <- system.file("extdata", "SetID.withweights.txt", package = "MAGEE")
out <- MAGEE(model0, interaction='sex', geno.file, group.file, group.file.sep = "\t",
tests=c("JV", "JF", "JD"))
print(out)
}
}
}
\keyword{ variant set-based test }
Expand Down
7 changes: 5 additions & 2 deletions man/MAGEE.meta.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ Xinyu Wang, Han Chen, Duy Pham
}
\examples{
\donttest{
library(GMMAT)
if(requireNamespace("SeqArray", quietly = TRUE) && requireNamespace("SeqVarTools",
quietly = TRUE)) {
library(GMMAT)
data(example)
attach(example)
model0 <- glmmkin(disease ~ age + sex, data = pheno, kins = GRM,
Expand All @@ -110,7 +112,8 @@ library(GMMAT)
print(out)
out1 <- MAGEE.meta(meta.file.prefix, group.file = group.file, tests = c("JV","JF","JD"))
print(out1)
unlink(paste0(meta.file.prefix, c("score", "cov"), ".1"))
unlink(paste0(meta.file.prefix, c(".score", ".cov"), ".1"))
}
}
}
\keyword{ variant set-based test }
Expand Down
14 changes: 8 additions & 6 deletions man/glmm.gei.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,19 @@ Xinyu Wang, Han Chen, Duy Pham
model0 <- glmmkin(disease ~ age + sex, data = pheno, kins = GRM,
id = "id", family = binomial(link = "logit"))
infile <- system.file("extdata", "geno.gds", package = "MAGEE")
gds_outfile <- tempfile()
glmm.gei(model0, interaction='sex', geno.file = infile, outfile = gds_outfile)
if(requireNamespace("SeqArray", quietly = TRUE) && requireNamespace("SeqVarTools",
quietly = TRUE)) {
infile <- system.file("extdata", "geno.gds", package = "MAGEE")
gds_outfile <- tempfile()
glmm.gei(model0, interaction='sex', geno.file = infile, outfile = gds_outfile)
unlink(gds_outfile)
}
infile <- system.file("extdata", "geno.bgen", package = "MAGEE")
samplefile <- system.file("extdata", "geno.sample", package = "MAGEE")
bgen_outfile <- tempfile()
glmm.gei(model0, interaction='sex', geno.file = infile, outfile = bgen_outfile,
bgen.samplefile = samplefile)
unlink(c(bgen_outfile, gds_outfile))
unlink(bgen_outfile)
}
\keyword{ generalized linear mixed model }
\keyword{ gene-environment interaction }
Expand Down
12 changes: 8 additions & 4 deletions tests/testthat/test_MAGEE.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
test_that("cross-sectional gaussian", {

skip_if_not_installed("SeqArray")
skip_if_not_installed("SeqVarTools")
gdsfile <- system.file("extdata", "geno.gds", package = "MAGEE")
bgenfile <- system.file("extdata", "geno.bgen", package = "MAGEE")
samplefile <- system.file("extdata", "geno.sample", package = "MAGEE")
Expand Down Expand Up @@ -115,7 +116,8 @@ test_that("cross-sectional gaussian", {

test_that("cross-sectional binomial", {
skip_on_cran()

skip_if_not_installed("SeqArray")
skip_if_not_installed("SeqVarTools")
gdsfile <- system.file("extdata", "geno.gds", package = "MAGEE")
bgenfile <- system.file("extdata", "geno.bgen", package = "MAGEE")
samplefile <- system.file("extdata", "geno.sample", package = "MAGEE")
Expand Down Expand Up @@ -231,7 +233,8 @@ test_that("cross-sectional binomial", {
### multi-phenotype MAGEE
test_that("multiple phenotypes gaussian", {
skip_on_cran()

skip_if_not_installed("SeqArray")
skip_if_not_installed("SeqVarTools")
gdsfile <- system.file("extdata", "geno.gds", package = "MAGEE")
bgenfile <- system.file("extdata", "geno.bgen", package = "MAGEE")
samplefile <- system.file("extdata", "geno.sample", package = "MAGEE")
Expand Down Expand Up @@ -348,7 +351,8 @@ test_that("multiple phenotypes gaussian", {
### longitudinal MAGEE
test_that("longitudinal random time trend gaussian", {
skip_on_cran()

skip_if_not_installed("SeqArray")
skip_if_not_installed("SeqVarTools")
gdsfile <- system.file("extdata", "geno.gds", package = "MAGEE")
bgenfile <- system.file("extdata", "geno.bgen", package = "MAGEE")
samplefile <- system.file("extdata", "geno.sample", package = "MAGEE")
Expand Down
14 changes: 12 additions & 2 deletions tests/testthat/test_MAGEE.meta.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
test_that("cross-sectional id le 400 binomial", {
skip_if_not_installed("SeqArray")
skip_if_not_installed("SeqVarTools")
gdsfile <- system.file("extdata", "geno.gds", package = "MAGEE")
group.file <- system.file("extdata", "SetID.withweights.txt", package = "MAGEE")
data(example)
Expand Down Expand Up @@ -40,6 +42,8 @@ test_that("cross-sectional id le 400 binomial", {

test_that("cross-sectional id gt 400 binomial", {
skip_on_cran()
skip_if_not_installed("SeqArray")
skip_if_not_installed("SeqVarTools")
gdsfile <- system.file("extdata", "geno.gds", package = "MAGEE")
group.file <- system.file("extdata", "SetID.withweights.txt", package = "MAGEE")
data(example)
Expand Down Expand Up @@ -70,6 +74,8 @@ test_that("cross-sectional id gt 400 binomial", {

test_that("cross-sectional id le 400 gaussian", {
skip_on_cran()
skip_if_not_installed("SeqArray")
skip_if_not_installed("SeqVarTools")
gdsfile <- system.file("extdata", "geno.gds", package = "MAGEE")
group.file <- system.file("extdata", "SetID.withweights.txt", package = "MAGEE")
data(example)
Expand Down Expand Up @@ -98,6 +104,8 @@ test_that("cross-sectional id le 400 gaussian", {

test_that("cross-sectional id gt 400 gaussian", {
skip_on_cran()
skip_if_not_installed("SeqArray")
skip_if_not_installed("SeqVarTools")
gdsfile <- system.file("extdata", "geno.gds", package = "MAGEE")
group.file <- system.file("extdata", "SetID.withweights.txt", package = "MAGEE")
data(example)
Expand Down Expand Up @@ -127,7 +135,8 @@ test_that("cross-sectional id gt 400 gaussian", {

test_that("longitudinal repeated measures gaussian", {
skip_on_cran()

skip_if_not_installed("SeqArray")
skip_if_not_installed("SeqVarTools")
gdsfile <- system.file("extdata", "geno.gds", package = "MAGEE")
group.file <- system.file("extdata", "SetID.withweights.txt", package = "MAGEE")
data(example)
Expand All @@ -149,7 +158,8 @@ test_that("longitudinal repeated measures gaussian", {

test_that("longitudinal random time trend gaussian", {
skip_on_cran()

skip_if_not_installed("SeqArray")
skip_if_not_installed("SeqVarTools")
gdsfile <- system.file("extdata", "geno.gds", package = "MAGEE")
group.file <- system.file("extdata", "SetID.withweights.txt", package = "MAGEE")
data(example)
Expand Down
7 changes: 6 additions & 1 deletion tests/testthat/test_glmm.gei.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
test_that("cross-sectional gaussian", {

skip_if_not_installed("SeqArray")
skip_if_not_installed("SeqVarTools")
gdsfile <- system.file("extdata", "geno.gds", package = "MAGEE")
bgenfile <- system.file("extdata", "geno.bgen", package = "MAGEE")
samplefile <- system.file("extdata", "geno.sample", package = "MAGEE")
Expand Down Expand Up @@ -526,6 +527,8 @@ test_that("cross-sectional gaussian", {

test_that("cross-sectional binomial", {
skip_on_cran()
skip_if_not_installed("SeqArray")
skip_if_not_installed("SeqVarTools")
gdsfile <- system.file("extdata", "geno.gds", package = "MAGEE")
bgenfile <- system.file("extdata", "geno.bgen", package = "MAGEE")
samplefile <- system.file("extdata", "geno.sample", package = "MAGEE")
Expand Down Expand Up @@ -1051,6 +1054,8 @@ test_that("cross-sectional binomial", {

test_that("longitudinal random time trend gaussian", {
skip_on_cran()
skip_if_not_installed("SeqArray")
skip_if_not_installed("SeqVarTools")
gdsfile <- system.file("extdata", "geno.gds", package = "MAGEE")
bgenfile <- system.file("extdata", "geno.bgen", package = "MAGEE")
samplefile <- system.file("extdata", "geno.sample", package = "MAGEE")
Expand Down
Loading

0 comments on commit 7d61b0c

Please sign in to comment.