hdmax2

High dimensional mediation analysis with max-squared tests

https://github.com/bcm-uga/hdmax2

Science Score: 39.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.7%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

High dimensional mediation analysis with max-squared tests

Basic Info
Statistics
  • Stars: 0
  • Watchers: 3
  • Forks: 1
  • Open Issues: 0
  • Releases: 1
Created almost 4 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Codemeta

README.md

hdmax2

The R package hdmax2 offers powerful tools for conducting high-dimensional mediation analysis. This method investigates the causal pathways linking exposure variables to outcome variables through intermediary factors known as mediators. These mediators often stem from biological metrics like transcriptomes or methylomes, which present data in high dimensions.

The package is capable of detecting individual mediators, accurately estimating the indirect effects of exposure variables associated with each mediator, and determining an overall indirect effect encompassing all detected mediators. Utilizing a latent factor mixed model methodology, the method effectively mitigates unobserved confounding factors. It accommodates exposures of diverse types and allows for the analysis of both continuous and binary outcomes.

Installation

``` conda create --name hdmax2

conda activate hdmax2 conda install -c conda-forge r-base conda install conda-forge::r-devtools conda install conda-forge::r-rcppeigen conda install conda-forge::r-lme4

R

install.packages("ggplot2") install.packages("prettydoc") install.packages("fdrtool") install.packages("mediation")

devtools::install_github("bcm-uga/hdmax2")

Installing R packages from GitHub may require that users remove older versions and restart their R session

The package might have been installed in your computer (even though it does not work). Remove it using remove.packages()

rs.restartR() if in RStudio

```

Usage

``` library(hdmax2) library(ggplot2)

Loading some simulated data

attach(simu_data)

Exposure variables

X = X_binary

Outcome variable

Y = Y_continuous

Intermediate variables including mediators

M = simu_data$M1

Choose K (latent factors number) from pca analysis (for example) on potential mediators

K = 5

detach(simu_data)

Computing significance values for intermediate variables

This step uses LFMMs and max-squared tests

hdmax2step1 = runAS(X = X, Y = Y, M = M, K = K)

Selecting mediators (ten variables having the lowest p-values)

mediatorstop10 = order(hdmax2step1$max2pvalues)[1:10] M10 = M[,mediators_top10]

Ids of selected mediators

colnames(M_10)

Estimating indirect and direct effects of exposure on outcome

hdmax2step2 = estimateeffect(object = hdmax2step1, m = M10)

Showing some results

plothdmax2(hdmax2step2, plottype = "allplot") ```

Bug report / Help

If you encounter a problem, please open a GitHub issue or contact the program developers.

References

  • Jumentier B, CC Barrot, M Estavoyer, J Tost, B Heude, O Francois, and J Lepeule (2023). High-Dimensional Mediation Analysis: A New Method Applied to Maternal Smoking, Placental DNA Methylation, and Birth Outcomes. Environmental Health Perspectives 131. Publisher: Environmental Health Perspectives, 047011. https://doi.org/10.1289/EHP11559.

Owner

  • Name: Mathematical and Computational Biology Research Group
  • Login: bcm-uga
  • Kind: organization
  • Location: Grenoble

Team of Mathematical and Computational Biology at Univ Grenoble Alpes (France).

CodeMeta (codemeta.json)

{
  "@context": "https://doi.org/10.5063/schema/codemeta-2.0",
  "@type": "SoftwareSourceCode",
  "identifier": "hdmax2",
  "description": "This package allows users to estimate the indirect effects of mediators, calculate the overall indirect effect of mediators, and facilitates the execution of high-dimensional mediation analysis. The HDMAX2 method includes unobserved confounding factors through a latent factor mixed model approach. It supports the use of exposures of various types and the consideration of both continuous and binary outcomes.",
  "name": "hdmax2: R package hdmax2 performs high dimension mediation analysis",
  "codeRepository": "https://github.com/bcm-uga/hdmax2",
  "license": "https://spdx.org/licenses/GPL-3.0",
  "version": "2.0.0.9000",
  "programmingLanguage": {
    "@type": "ComputerLanguage",
    "name": "R",
    "url": "https://r-project.org"
  },
  "runtimePlatform": "R version 4.3.1 (2023-06-16)",
  "author": [
    {
      "@type": "Person",
      "givenName": "Florence",
      "familyName": "Pittion",
      "email": "florence.pittion@univ-grenoble-alpes.fr"
    },
    {
      "@type": "Person",
      "givenName": "Magali",
      "familyName": "Richard",
      "email": "magali.richard@univ-grenoble-alpes.fr"
    },
    {
      "@type": "Person",
      "givenName": "Olivier",
      "familyName": "Francois",
      "email": "olivier.francois@univ-grenoble-alpes.fr"
    },
    {
      "@type": "Person",
      "givenName": "Basile",
      "familyName": "Jumentier",
      "email": "basile.jumentier@gmail.com"
    }
  ],
  "contributor": [
    {
      "@type": "Person",
      "givenName": "Magali",
      "familyName": "Richard",
      "email": "magali.richard@univ-grenoble-alpes.fr"
    },
    {
      "@type": "Person",
      "givenName": "Olivier",
      "familyName": "Francois",
      "email": "olivier.francois@univ-grenoble-alpes.fr"
    }
  ],
  "maintainer": [
    {
      "@type": "Person",
      "givenName": "Florence",
      "familyName": "Pittion",
      "email": "florence.pittion@univ-grenoble-alpes.fr"
    }
  ],
  "softwareSuggestions": [
    {
      "@type": "SoftwareApplication",
      "identifier": "knitr",
      "name": "knitr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=knitr"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "rmarkdown",
      "name": "rmarkdown",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=rmarkdown"
    }
  ],
  "softwareRequirements": {
    "1": {
      "@type": "SoftwareApplication",
      "identifier": "mltools",
      "name": "mltools",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=mltools"
    },
    "2": {
      "@type": "SoftwareApplication",
      "identifier": "ggplot2",
      "name": "ggplot2",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=ggplot2"
    },
    "3": {
      "@type": "SoftwareApplication",
      "identifier": "survival",
      "name": "survival",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=survival"
    },
    "4": {
      "@type": "SoftwareApplication",
      "identifier": "dplyr",
      "name": "dplyr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=dplyr"
    },
    "5": {
      "@type": "SoftwareApplication",
      "identifier": "mediation",
      "name": "mediation",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=mediation"
    },
    "6": {
      "@type": "SoftwareApplication",
      "identifier": "stats",
      "name": "stats"
    },
    "7": {
      "@type": "SoftwareApplication",
      "identifier": "utils",
      "name": "utils"
    },
    "8": {
      "@type": "SoftwareApplication",
      "identifier": "data.table",
      "name": "data.table",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=data.table"
    },
    "9": {
      "@type": "SoftwareApplication",
      "identifier": "Biostrings",
      "name": "Biostrings",
      "provider": {
        "@id": "https://www.bioconductor.org",
        "@type": "Organization",
        "name": "Bioconductor",
        "url": "https://www.bioconductor.org"
      },
      "sameAs": "https://bioconductor.org/packages/release/bioc/html/Biostrings.html"
    },
    "10": {
      "@type": "SoftwareApplication",
      "identifier": "IRanges",
      "name": "IRanges",
      "provider": {
        "@id": "https://www.bioconductor.org",
        "@type": "Organization",
        "name": "Bioconductor",
        "url": "https://www.bioconductor.org"
      },
      "sameAs": "https://bioconductor.org/packages/release/bioc/html/IRanges.html"
    },
    "11": {
      "@type": "SoftwareApplication",
      "identifier": "gridExtra",
      "name": "gridExtra",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=gridExtra"
    },
    "12": {
      "@type": "SoftwareApplication",
      "identifier": "R",
      "name": "R",
      "version": ">= 2.10"
    },
    "SystemRequirements": null
  },
  "fileSize": "850.17KB",
  "relatedLink": "https://bcm-uga.github.io/hdmax2/",
  "readme": "https://github.com/bcm-uga/hdmax2/blob/main/README.md"
}

GitHub Events

Total
  • Issues event: 2
  • Issue comment event: 1
  • Push event: 31
Last Year
  • Issues event: 2
  • Issue comment event: 1
  • Push event: 31

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 1
  • Total pull requests: 0
  • Average time to close issues: 21 days
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 2.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: 21 days
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 2.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • Aidenwatchdogs (1)
Pull Request Authors
  • FloPittion (2)
Top Labels
Issue Labels
Pull Request Labels