From a4b949492b09199a14424ed439c5105b8b8c9975 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 27 Feb 2023 00:38:27 -0600 Subject: r-twosamplemr: add new package and dependencies (#35683) --- .../builtin/packages/r-arrangements/package.py | 27 ++++++++++++ .../builtin/packages/r-googleauthr/package.py | 28 ++++++++++++ .../repos/builtin/packages/r-ieugwasr/package.py | 26 +++++++++++ .../repos/builtin/packages/r-iterpc/package.py | 29 ++++++++++++ .../packages/r-mendelianrandomization/package.py | 32 ++++++++++++++ var/spack/repos/builtin/packages/r-meta/package.py | 33 ++++++++++++++ .../repos/builtin/packages/r-metadat/package.py | 21 +++++++++ .../repos/builtin/packages/r-metafor/package.py | 39 +++++++++++++++++ .../repos/builtin/packages/r-mr-raps/package.py | 24 ++++++++++ .../builtin/packages/r-mrinstruments/package.py | 19 ++++++++ .../repos/builtin/packages/r-mrmix/package.py | 18 ++++++++ .../repos/builtin/packages/r-mrpresso/package.py | 21 +++++++++ .../repos/builtin/packages/r-radialmr/package.py | 23 ++++++++++ .../builtin/packages/r-twosamplemr/package.py | 51 ++++++++++++++++++++++ 14 files changed, 391 insertions(+) create mode 100644 var/spack/repos/builtin/packages/r-arrangements/package.py create mode 100644 var/spack/repos/builtin/packages/r-googleauthr/package.py create mode 100644 var/spack/repos/builtin/packages/r-ieugwasr/package.py create mode 100644 var/spack/repos/builtin/packages/r-iterpc/package.py create mode 100644 var/spack/repos/builtin/packages/r-mendelianrandomization/package.py create mode 100644 var/spack/repos/builtin/packages/r-meta/package.py create mode 100644 var/spack/repos/builtin/packages/r-metadat/package.py create mode 100644 var/spack/repos/builtin/packages/r-metafor/package.py create mode 100644 var/spack/repos/builtin/packages/r-mr-raps/package.py create mode 100644 var/spack/repos/builtin/packages/r-mrinstruments/package.py create mode 100644 var/spack/repos/builtin/packages/r-mrmix/package.py create mode 100644 var/spack/repos/builtin/packages/r-mrpresso/package.py create mode 100644 var/spack/repos/builtin/packages/r-radialmr/package.py create mode 100644 var/spack/repos/builtin/packages/r-twosamplemr/package.py diff --git a/var/spack/repos/builtin/packages/r-arrangements/package.py b/var/spack/repos/builtin/packages/r-arrangements/package.py new file mode 100644 index 0000000000..d813874372 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-arrangements/package.py @@ -0,0 +1,27 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class RArrangements(RPackage): + """Fast Generators and Iterators for Permutations, Combinations, Integer + Partitions and Compositions. + + Fast generators and iterators for permutations, combinations, integer + partitions and compositions. The arrangements are in lexicographical order + and generated iteratively in a memory efficient manner. It has been + demonstrated that 'arrangements' outperforms most existing packages of + similar kind. Benchmarks could be found at + .""" + + cran = "arrangements" + + version("1.1.9", sha256="e9b5dcb185ec9b28201b196384b04a8d5a15f4ddb9e0b0b2a0c718635ff7345b") + + depends_on("r@3.4.0:", type=("build", "run")) + depends_on("r-gmp", type=("build", "run")) + depends_on("r-r6", type=("build", "run")) + depends_on("gmp@4.2.3:") diff --git a/var/spack/repos/builtin/packages/r-googleauthr/package.py b/var/spack/repos/builtin/packages/r-googleauthr/package.py new file mode 100644 index 0000000000..d31fd7f0c1 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-googleauthr/package.py @@ -0,0 +1,28 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class RGoogleauthr(RPackage): + """Authenticate and Create Google APIs. + + Create R functions that interact with OAuth2 Google APIs + easily, with auto-refresh + and Shiny compatibility.""" + + cran = "googleAuthR" + + version("2.0.0", sha256="ba504baf3bde2e1b3e988bee7602df5765cc6ca542cf0ab76a782c4e60966feb") + + depends_on("r@3.3.0:", type=("build", "run")) + depends_on("r-assertthat", type=("build", "run")) + depends_on("r-cli", type=("build", "run")) + depends_on("r-digest", type=("build", "run")) + depends_on("r-gargle@1.2.0:", type=("build", "run")) + depends_on("r-httr@1.4.0:", type=("build", "run")) + depends_on("r-jsonlite@1.6:", type=("build", "run")) + depends_on("r-memoise@1.1.0:", type=("build", "run")) + depends_on("r-rlang", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/r-ieugwasr/package.py b/var/spack/repos/builtin/packages/r-ieugwasr/package.py new file mode 100644 index 0000000000..bce36046bb --- /dev/null +++ b/var/spack/repos/builtin/packages/r-ieugwasr/package.py @@ -0,0 +1,26 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class RIeugwasr(RPackage): + """R Interface to the OpenGWAS Database API. + + R interface to the OpenGWAS database API. Includes a wrapper + to make generic calls to the API, plus convenience functions for + specific queries.""" + + homepage = "https://github.com/MRCIEU/ieugwasr" + url = "https://github.com/MRCIEU/ieugwasr/archive/refs/tags/0.1.5.tar.gz" + + version("0.1.5", sha256="8d900d5a780f23836c80191f9635fbf48a0ca94f828452948c0f445e3217f422") + + depends_on("r@3.6.0:", type=("build", "run")) + depends_on("r-magrittr", type=("build", "run")) + depends_on("r-googleauthr", type=("build", "run")) + depends_on("r-dplyr", type=("build", "run")) + depends_on("r-httr", type=("build", "run")) + depends_on("r-jsonlite", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/r-iterpc/package.py b/var/spack/repos/builtin/packages/r-iterpc/package.py new file mode 100644 index 0000000000..f038fe3249 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-iterpc/package.py @@ -0,0 +1,29 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class RIterpc(RPackage): + """Efficient Iterator for Permutations and Combinations. + + Iterator for generating permutations and combinations. They can be either + drawn with or without replacement, or with distinct/ non-distinct items + (multiset). The generated sequences are in lexicographical order + (dictionary order). The algorithms to generate permutations and + combinations are memory efficient. These iterative algorithms enable users + to process all sequences without putting all results in the memory at the + same time. The algorithms are written in C/C++ for faster performance. + Note: 'iterpc' is no longer being maintained. Users are recommended to + switch to 'arrangements'.""" + + cran = "iterpc" + + version("0.4.2", sha256="38bd464042a27536f676e889263eb2c257a431b59083f58cb54473f42ba2071b") + + depends_on("r@3.0.0:", type=("build", "run")) + depends_on("r-iterators", type=("build", "run")) + depends_on("r-gmp@0.5-12:", type=("build", "run")) + depends_on("r-arrangements@1.0.0:", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/r-mendelianrandomization/package.py b/var/spack/repos/builtin/packages/r-mendelianrandomization/package.py new file mode 100644 index 0000000000..ed7b9a905b --- /dev/null +++ b/var/spack/repos/builtin/packages/r-mendelianrandomization/package.py @@ -0,0 +1,32 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class RMendelianrandomization(RPackage): + """Mendelian Randomization Package. + + Encodes several methods for performing Mendelian randomization analyses + with summarized data. Summarized data on genetic associations with the + exposure and with the outcome can be obtained from large consortia. These + data can be used for obtaining causal estimates using instrumental variable + methods.""" + + cran = "MendelianRandomization" + + version("0.7.0", sha256="cad7cc1b6964fc7d299864378694c5fd947caa83796a1958e581299796b854c7") + + depends_on("r@3.0.1:", type=("build", "run")) + depends_on("r-knitr", type=("build", "run")) + depends_on("r-rmarkdown", type=("build", "run")) + depends_on("r-plotly@3.6.0:", type=("build", "run")) + depends_on("r-ggplot2@1.0.1:", type=("build", "run")) + depends_on("r-robustbase@0.92-6:", type=("build", "run")) + depends_on("r-matrix@1.2:", type=("build", "run")) + depends_on("r-iterpc@0.3:", type=("build", "run")) + depends_on("r-quantreg@5.01:", type=("build", "run")) + depends_on("r-rjson", type=("build", "run")) + depends_on("r-glmnet", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/r-meta/package.py b/var/spack/repos/builtin/packages/r-meta/package.py new file mode 100644 index 0000000000..b82dce1089 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-meta/package.py @@ -0,0 +1,33 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class RMeta(RPackage): + """General Package for Meta-Analysis. + + User-friendly general package providing standard methods for meta-analysis + and supporting Schwarzer, Carpenter, and Rücker + , "Meta-Analysis with R" (2015): - common + effect and random effects meta-analysis; - several plots (forest, funnel, + Galbraith / radial, L'Abbe, Baujat, bubble); - three-level meta-analysis + model; - generalised linear mixed model; - Hartung-Knapp method for random + effects model; - Kenward-Roger method for random effects model; - + prediction interval; - statistical tests for funnel plot asymmetry; - + trim-and-fill method to evaluate bias in meta-analysis; - meta-regression; + - cumulative meta-analysis and leave-one-out meta-analysis; - import data + from 'RevMan 5'; - produce forest plot summarising several (subgroup) + meta-analyses.""" + + cran = "meta" + + version("6.2-0", sha256="8ec8fb412996bbe17d3ca073f15c191a77bad486b08f39d7b8c2d07360ad5781") + + depends_on("r@4.0.0:", type=("build", "run")) + depends_on("r-metafor@3.0-0:", type=("build", "run")) + depends_on("r-lme4", type=("build", "run")) + depends_on("r-compquadform", type=("build", "run")) + depends_on("r-xml2", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/r-metadat/package.py b/var/spack/repos/builtin/packages/r-metadat/package.py new file mode 100644 index 0000000000..71e2495418 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-metadat/package.py @@ -0,0 +1,21 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class RMetadat(RPackage): + """Meta-Analysis Datasets. + + A collection of meta-analysis datasets for teaching purposes, + illustrating/testing meta-analytic methods, and validating published + analyses.""" + + cran = "metadat" + + version("1.2-0", sha256="f0cce5e30c3d256eaf5a41e4f52ffc7108e195016a4b99409e0ab4c2ef58f5b8") + + depends_on("r@4.0.0:", type=("build", "run")) + depends_on("r-mathjaxr", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/r-metafor/package.py b/var/spack/repos/builtin/packages/r-metafor/package.py new file mode 100644 index 0000000000..534c80fa47 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-metafor/package.py @@ -0,0 +1,39 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class RMetafor(RPackage): + """Meta-Analysis Package for R. + + A comprehensive collection of functions for conducting meta-analyses in R. + The package includes functions to calculate various effect sizes or outcome + measures, fit equal-, fixed-, random-, and mixed-effects models to such + data, carry out moderator and meta-regression analyses, and create various + types of meta-analytical plots (e.g., forest, funnel, radial, L'Abbe, + Baujat, bubble, and GOSH plots). For meta-analyses of binomial and + person-time data, the package also provides functions that implement + specialized methods, including the Mantel-Haenszel method, Peto's method, + and a variety of suitable generalized linear (mixed-effects) models (i.e., + mixed-effects logistic and Poisson regression models). Finally, the package + provides functionality for fitting meta-analytic multivariate/multilevel + models that account for non-independent sampling errors and/or true effects + (e.g., due to the inclusion of multiple treatment studies, multiple + endpoints, or other forms of clustering). Network meta-analyses and + meta-analyses accounting for known correlation structures (e.g., due to + phylogenetic relatedness) can also be conducted. An introduction to the + package can be found in Viechtbauer (2010) .""" + + cran = "metafor" + + version("3.8-1", sha256="d694577f954144d8a5eeab6521fe1c87e68ddf9ecfd7ccc915d01533371b0514") + + depends_on("r@4.0.0:", type=("build", "run")) + depends_on("r-matrix", type=("build", "run")) + depends_on("r-metadat", type=("build", "run")) + depends_on("r-nlme", type=("build", "run")) + depends_on("r-mathjaxr", type=("build", "run")) + depends_on("r-pbapply", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/r-mr-raps/package.py b/var/spack/repos/builtin/packages/r-mr-raps/package.py new file mode 100644 index 0000000000..496756f916 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-mr-raps/package.py @@ -0,0 +1,24 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class RMrRaps(RPackage): + """Two Sample Mendelian Randomization using Robust Adjusted Profile Score. + + Mendelian randomization is a method of identifying and estimating a + confounded causal effect using genetic instrumental variables. This + packages implements methods for two-sample Mendelian randomization with + summary statistics by using Robust Adjusted Profile Score (RAPS). + References: Qingyuan Zhao, Jingshu Wang, Jack Bowden, Dylan S. Small. + Statistical inference in two-sample summary-data Mendelian randomization + using robust adjusted profile score. .""" + + cran = "mr.raps" + + version("0.2", sha256="c899f6143dac99e1232ff0a8d9f5fe099d4f69960782e6843db5b0d7f4f63b19") + + depends_on("r-nortest", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/r-mrinstruments/package.py b/var/spack/repos/builtin/packages/r-mrinstruments/package.py new file mode 100644 index 0000000000..d80922c1ca --- /dev/null +++ b/var/spack/repos/builtin/packages/r-mrinstruments/package.py @@ -0,0 +1,19 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class RMrinstruments(RPackage): + """Data sources for genetic instruments to be used in MR. + + Datasets of eQTLs, GWAS catalogs, etc.""" + + homepage = "https://github.com/MRCIEU/MRInstruments" + url = "https://github.com/MRCIEU/MRInstruments/archive/refs/tags/0.3.3.tar.gz" + + version("0.3.3", sha256="4ddbaf6335133e8f7baef469d6bc1f89212462b9f4062c9e4ddda37b12eb3486") + + depends_on("r@2.10:", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/r-mrmix/package.py b/var/spack/repos/builtin/packages/r-mrmix/package.py new file mode 100644 index 0000000000..d6c51a7541 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-mrmix/package.py @@ -0,0 +1,18 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class RMrmix(RPackage): + """Mendelian Randomization Analysis Using Mixture Models (MRMix). + + This package gives robust estimation of causal effects by conducting + Mendelian randomization analysis using a mixture model approach.""" + + homepage = "https://github.com/gqi/MRMix" + git = "https://github.com/gqi/MRMix" + + version("0.1.0", commit="56afdb2bc96760842405396f5d3f02e60e305039") diff --git a/var/spack/repos/builtin/packages/r-mrpresso/package.py b/var/spack/repos/builtin/packages/r-mrpresso/package.py new file mode 100644 index 0000000000..7d4ab68341 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-mrpresso/package.py @@ -0,0 +1,21 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class RMrpresso(RPackage): + """Performs the Mendelian Randomization Pleiotropy RESidual Sum and Outlier + (MR-PRESSO) test. + + MR-PRESSO (Mendelian Randomization Pleiotropy RESidual Sum and Outlier) is + a framework that allows for the evaluation of pleiotropy in + multi-instrument Mendelian Randomization utilizing genome-wide summary + association statistics.""" + + homepage = "https://github.com/rondolab/MR-PRESSO" + git = "https://github.com/rondolab/MR-PRESSO" + + version("1.0", commit="cece763b47e59763a7916974de43c7cb93843e41") diff --git a/var/spack/repos/builtin/packages/r-radialmr/package.py b/var/spack/repos/builtin/packages/r-radialmr/package.py new file mode 100644 index 0000000000..301bd60fc1 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-radialmr/package.py @@ -0,0 +1,23 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class RRadialmr(RPackage): + """RadialMR. + + A package for implementing radial inverse variance weighted and MR-Egger + methods.""" + + homepage = "https://github.com/WSpiller/RadialMR" + git = "https://github.com/WSpiller/RadialMR" + + version("1.0", commit="d63d3fc8270836ab441b9e14a5ba3eeb2795d7cb") + + depends_on("r@3.5.0:", type=("build", "run")) + depends_on("r-ggplot2", type=("build", "run")) + depends_on("r-magrittr", type=("build", "run")) + depends_on("r-plotly", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/r-twosamplemr/package.py b/var/spack/repos/builtin/packages/r-twosamplemr/package.py new file mode 100644 index 0000000000..7ca1bc9a22 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-twosamplemr/package.py @@ -0,0 +1,51 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class RTwosamplemr(RPackage): + """Two Sample MR functions and interface to MR Base database. + + A package for performing Mendelian randomization using GWAS summary data. + It uses the IEU GWAS database to obtain data automatically, and a wide + range of methods to run the analysis. You can use the MR-Base web app to + try out a limited range of the functionality in this package, but for any + serious work we strongly recommend using this R package.""" + + homepage = "https://mrcieu.github.io/TwoSampleMR/" + url = "https://github.com/MRCIEU/TwoSampleMR/archive/refs/tags/v0.5.6.tar.gz" + + version("0.5.6", sha256="c63eb008ab7ed08a6f30ccbf0c299beb31b2f5835e5e2aa1b59c5e4fe284a30c") + + depends_on("r@3.6.0:", type=("build", "run")) + depends_on("r-ieugwasr@0.1.5:", type=("build", "run")) + depends_on("r-ggplot2", type=("build", "run")) + depends_on("r-gridextra", type=("build", "run")) + depends_on("r-cowplot", type=("build", "run")) + depends_on("r-plyr", type=("build", "run")) + depends_on("r-reshape2", type=("build", "run")) + depends_on("r-stringr", type=("build", "run")) + depends_on("r-knitr", type=("build", "run")) + depends_on("r-markdown", type=("build", "run")) + depends_on("r-gtable", type=("build", "run")) + depends_on("r-rmarkdown", type=("build", "run")) + depends_on("r-mendelianrandomization", type=("build", "run")) + depends_on("r-dplyr", type=("build", "run")) + depends_on("r-mr-raps", type=("build", "run")) + depends_on("r-psych", type=("build", "run")) + depends_on("r-magrittr", type=("build", "run")) + depends_on("r-car", type=("build", "run")) + depends_on("r-randomforest", type=("build", "run")) + depends_on("r-meta", type=("build", "run")) + depends_on("r-data-table", type=("build", "run")) + depends_on("r-mrpresso", type=("build", "run")) + depends_on("r-mrinstruments", type=("build", "run")) + depends_on("r-radialmr", type=("build", "run")) + depends_on("r-mrmix", type=("build", "run")) + depends_on("r-glmnet", type=("build", "run")) + depends_on("r-lattice", type=("build", "run")) + depends_on("r-pbapply", type=("build", "run")) + depends_on("r-mass", type=("build", "run")) -- cgit v1.2.3-70-g09d2