{"id":32203969,"url":"https://github.com/lcrawlab/mvmapit","last_synced_at":"2025-10-22T04:49:24.837Z","repository":{"id":39271878,"uuid":"352387967","full_name":"lcrawlab/mvMAPIT","owner":"lcrawlab","description":"The multivariate MArginal ePIstasis Test","archived":false,"fork":false,"pushed_at":"2025-10-16T16:03:46.000Z","size":39680,"stargazers_count":13,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-22T04:48:59.252Z","etag":null,"topics":["cpp","cran","epistasis","epistasis-analysis","gwas","gwas-tools","linear-mixed-models","mapit","mvmapit","r","variance-components"],"latest_commit_sha":null,"homepage":"https://lcrawlab.github.io/mvMAPIT/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lcrawlab.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-28T17:04:48.000Z","updated_at":"2025-06-26T09:40:43.000Z","dependencies_parsed_at":"2023-10-17T01:22:16.419Z","dependency_job_id":"1ba3370c-e091-4d97-bfeb-fdc0707257c5","html_url":"https://github.com/lcrawlab/mvMAPIT","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/lcrawlab/mvMAPIT","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lcrawlab%2FmvMAPIT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lcrawlab%2FmvMAPIT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lcrawlab%2FmvMAPIT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lcrawlab%2FmvMAPIT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lcrawlab","download_url":"https://codeload.github.com/lcrawlab/mvMAPIT/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lcrawlab%2FmvMAPIT/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280382975,"owners_count":26321423,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-22T02:00:06.515Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","cran","epistasis","epistasis-analysis","gwas","gwas-tools","linear-mixed-models","mapit","mvmapit","r","variance-components"],"created_at":"2025-10-22T04:49:23.711Z","updated_at":"2025-10-22T04:49:24.831Z","avatar_url":"https://github.com/lcrawlab.png","language":"R","readme":"\n# Multivariate MAPIT Documentation \u003cimg src=\"man/figures/logo.png\" align=\"right\" alt=\"\" width=\"120\"/\u003e\n\n[![R CMD check](https://github.com/lcrawlab/mvMAPIT/actions/workflows/check-standard.yaml/badge.svg)](https://github.com/lcrawlab/mvMAPIT/actions/workflows/check-standard.yaml)\n[![Docker Image CI](https://github.com/lcrawlab/mvMAPIT/actions/workflows/docker-image.yml/badge.svg)](https://github.com/lcrawlab/mvMAPIT/actions/workflows/docker-image.yml)\n[![CRAN downloads](https://cranlogs.r-pkg.org/badges/grand-total/mvMAPIT)](https://cranlogs.r-pkg.org/badges/grand-total/mvMAPIT)\n[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/mvMAPIT)](https://cran.r-project.org/package=mvMAPIT)\n\nFind the full package documentation including examples and articles here: [Multivariate MAPIT Documentation](https://lcrawlab.github.io/mvMAPIT/).\n\n\n## The multivariate MArginal ePIstasis Test (mvMAPIT)\nThis R package is a generalization of the [MAPIT\nimplementation](https://github.com/lorinanthony/MAPIT) by Crawford et\nal. (2017)[^1] for any number of traits as described by Stamp et al. (2023)[^2].\nThe univariate MAPIT test for marginal epistasis is implemented as the special\ncase of running multivariate MAPIT with a single trait.\n\nmvMAPIT is implemented as a set of R and C++ routines, which can be\ncarried out within an R environment.\n\n### Introduction\nEpistasis, commonly defined as the interaction between genetic loci, is known to\nplay an important role in the phenotypic variation of complex traits. As a\nresult, many statistical methods have been developed to identify genetic variants\nthat are involved in epistasis, and nearly all of these approaches carry out\nthis task by focusing on analyzing one trait at a time. However, because of the\nlarge combinatorial search space of interactions, most epistasis mapping\nmethods face enormous computational challenges and often suffer from low\nstatistical power.\n\nPrevious studies have shown that jointly modeling multiple phenotypes can often\ndramatically increase statistical power for association mapping. Therefore, here\nwe present the **multivariate MArginal ePIstasis Test (mvMAPIT)** – a\nmulti-outcome generalization of a recently proposed epistatic detection method\nwhich seeks to detect *marginal epistasis* or the combined pairwise interaction\neffects between a given variant and all other variants. By searching for marginal\nepistatic effects, one can identify genetic variants that are involved in\nepistasis without the need to identify the exact partners with which the variants\ninteract – thus, potentially alleviating much of the statistical and computational\nburden associated with conventional explicit search based methods. Our proposed\nmvMAPIT builds upon this strategy by leveraging correlation structures between\ntraits to improve the identification of variants involved in epistasis. We\nformulate mvMAPIT as a multivariate linear mixed model and develop a multi-trait\nvariance component estimation algorithm for efficient parameter inference and\n*P*-value computation. Together with reasonable model approximations, our proposed\napproach is scalable to moderately sized GWA studies.\n\n\n### The Method\nThe **multivariate MArginal ePIstasis Test** is a multi-outcome extension of the\nstatistical framework MAPIT which aims to identify variants that are involved in\nepistatic interactions by leveraging the correlation structure of non-additive\ngenetic variation that is shared between multiple traits. The key idea behind the\nconcept of marginal epistasis is to identify variants that are involved in\nepistasis while avoiding the need to explicitly conduct an exhaustive search over\nall possible pairwise interactions. As an overview of mvMAPIT and its\ncorresponding software implementation, we will assume that we have access to a\nGWA study on `N` individuals denoted as `D = {X,Y}` where `X` is an `N x J` matrix\nof genotypes with `J` denoting the number of SNPs (each of which is encoded as\n`{0,1,2}` copies of a reference allele at each locus `j`) and `Y` denoting a `N x D`\nmatrix holding `D` different traits that are measured for each of the `N`\nindividuals.\n\nThe goal of mvMAPIT is to identify variants that have non-zero interaction effects\nwith any other variant in the data. To accomplish this, we examine each SNP in\nturn and assess the null hypothesis that its corresponding variance component is zero. In\npractice, we use a computationally efficient method of moments algorithm called MQS from Zhou (2017)[^3]\nto estimate model parameters and to carry out calibrated statistical tests within\nmvMAPIT.\n\n## Installation\n\nThe package needs compilation but the released version can be installed from\nCRAN.\n\n```R\ninstall.packages(\"mvMAPIT\")\n```\n\n### The R Environment\nR is a widely used, free, and open source software environment for\nstatistical computing and graphics. The most recent version of R can be\ndownloaded from the [Comprehensive R Archive Network\n(CRAN)](https://cran.r-project.org/). CRAN provides precompiled binary\nversions of R for Windows, macOS, and select Linux distributions that\nare likely sufficient for many users' needs. Users can also install R\nfrom source code; however, this may require a significant amount of\neffort. For specific details on how to compile, install, and manage R\nand R-packages, refer to the manual [R Installation and\nAdministration](https://cran.r-project.org/doc/manuals/r-release/R-admin.html).\n\n### R Packages Required for mvMAPIT\nmvMAPIT requires the installation of the following R libraries:\n\n- [checkmate](https://cran.r-project.org/package=checkmate)\n- [CompQuadForm](https://cran.r-project.org/package=CompQuadForm)\n- [dplyr](https://cran.r-project.org/package=dplyr)\n- [foreach](https://cran.r-project.org/package=foreach)\n- [harmonicmeanp](https://cran.r-project.org/package=harmonicmeanp)\n- [logging](https://cran.r-project.org/package=logging)\n- [mvtnorm](https://cran.r-project.org/package=mvtnorm)\n- [Rcpp](https://cran.r-project.org/package=Rcpp)\n- [RcppAlgos](https://cran.r-project.org/package=RcppAlgos)\n- [RcppArmadillo](https://cran.r-project.org/package=RcppArmadillo)\n- [RcppParallel](https://cran.r-project.org/package=RcppParallel)\n- [RcppSpdlog](https://cran.r-project.org/package=RcppSpdlog)\n- [tidyr](https://cran.r-project.org/package=tidyr)\n\nThe easiest method to install these packages is with the following\nexample command entered in an R shell:\n\n``` {.R}\ninstall.packages(c( 'checkmate', \n                    'CompQuadForm', \n                    'dplyr', \n                    'foreach', \n                    'harmonicmeanp', \n                    'logging', \n                    'mvtnorm', \n                    'Rcpp', \n                    'RcppAlgos', \n                    'RcppArmadillo', \n                    'RcppParallel', \n                    'RcppProgress', \n                    'RcppSpdlog', \n                    'testthat', \n                    'tidyr', \n                    'truncnorm'), \n                    dependencies = TRUE);\n```\n\nAlternatively, one can also [install R packages from the\ncommand-line](https://cran.r-project.org/doc/manuals/r-release/R-admin.html#Installing-packages).\n\n### Installing mvMAPIT from Sources\nThe easiest way to install the package from sources is to change into\nthe directory of mvMAPIT and run `R CMD INSTALL . --preclean`. The\n`--preclean` flag makes sure that the latest state is run.\n\n### C++ Functions Required for MAPIT\n\nThe code in this repository assumes that basic Fortran and C++ libraries and compilers are already set up on the running personal computer or\ncluster. If not, the mvMAPIT functions and necessary Rcpp packages will\nnot work properly. A simple option is to use\n[gcc](https://gcc.gnu.org/). macOS users may use this collection by\ninstalling the [Homebrew package manager](https://brew.sh/index.html) and\nthen typing the following into the terminal:\n\n``` {.bash}\nbrew install gcc\n```\n### OpenMP\nNote that mvMAPIT takes advantage of [OpenMP](https://www.openmp.org/), an\nAPI for multi-platform shared-memory parallel programming in C/C++. This\nis to speed up the computational time of the modeling algorithm.\nUnfortunately, macOS does not currently support OpenMP under the default\ncompiler. A work around to use OpenMP in R on macOS can be found\n[here](https://thecoatlessprofessor.com/programming/openmp-in-r-on-os-x/).\nmvMAPIT can be compiled without OpenMP, but we recommend using it if\napplicable for scalability.\n\n### Known Issues\n- When your compiler changes, some R package dependencies might need to be recompiled. This is likely the case if the compilation error explicitly names an R package in the local library.\n\n- On macOS, you might need to run `brew reinstall z3` to fix `'libz3.4.11.dylib' (no such file)` related errors ([clang issues](https://github.com/Homebrew/discussions/discussions/3920)).\n\n- For extra tips on how to run C++ on macOS, please visit\n\u003chttps://seananderson.ca/2013/11/18/rcpp-mavericks.html\u003e.\n\n- For tips on how to avoid errors dealing with `-lgfortran` or `-lquadmath`, please visit\n\u003chttps://thecoatlessprofessor.com/programming/rcpp-rcpparmadillo-and-os-x-mavericks-lgfortran-and-lquadmath-error/\u003e.\n\n------------------------------------------------------------------------\n\n## Questions and Feedback\nFor questions or concerns with the MAPIT functions, please contact\n[Lorin Crawford](mailto:lcrawford@microsoft.com) or\n[Julian Stamp](mailto:julian_stamp@brown.edu).\n\nWe appreciate any feedback you may have with our repository and instructions.\n\n## References\n[^1]: L. Crawford, P. Zeng, S. Mukherjee, X. Zhou (2017). Detecting\n    epistasis with the marginal epistasis test in genetic mapping\n    studies of quantitative traits. *PLoS Genet*. **13**(7): e1006869.\n    \u003chttps://journals.plos.org/plosgenetics/article?id=10.1371/journal.pgen.1006869\u003e\n\n[^2]: J. Stamp, A. DenAdel, D. Weinreich, L. Crawford (2023). Leveraging the\n    Genetic Correlation between Traits Improves the Detection of Epistasis in\n    Genome-wide Association Studies. *G3 Genes|Genomes|Genetics*, **13**(8), jkad118. doi:\n    \u003chttps://doi.org/10.1093/g3journal/jkad118\u003e\n\n[^3]: X. Zhou (2017). A unified framework for variance component estimation with summary statistics\n  in genome-wide association studies. *Ann Appl Stat*. **11**(4): 2027-2051.\n  \u003chttps://projecteuclid.org/journals/annals-of-applied-statistics/volume-11/issue-4/A-unified-framework-for-variance-component-estimation-with-summary-statistics/10.1214/17-AOAS1052.full\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flcrawlab%2Fmvmapit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flcrawlab%2Fmvmapit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flcrawlab%2Fmvmapit/lists"}