Code Monkey home page Code Monkey logo

metabolite-investigator's Introduction

Metabolite-Investigator

Description

This is a Shiny-App with the aim of facilitating association and covariate selection for targeted metabolomics data from multiple studies with a wide range of factors (demographic, lifestyle, etc.). A detailed description of the implemented methods can be found here. Features of the App are:

A detailed description of the methods used in the analysis as well as an application with data for 63 metabolites and 29 factors in three studies (N=16,222) is integrated in the LHA (Leipzig Health Atlas) here.

  • Upload of data (with seperate files for metabolite and factor data)
  • Matching via ID overlap
  • Preprocessing of data in each cohort including
    • Removal of outliers defined as values +5 times the sample standard deviation (5*SD) on log-transformed data
    • Inverse-normal-transformation of data to remove skew while regainig data structure (concerning zero-inflated values)
    • Nonparametric batch-adjustment via an empirical Bayes method (sva::ComBat)
  • Univariable association step of each metabolite with each factor in each cohort (Metabolite_i ~ Factor_j)
  • Univariable test for interaction of each factor with the cohort term (Metabolite_i ~ Factor_j + cohort + Factor_j*cohort)
  • Correlation check and user guided descision on exclusion of too highly correlating factors
  • Multivariable association step of each metabolite with all factors in each cohort (Metabolite_i ~ Factor_1 + Factor_2 + ... Factor_J)
  • Multivariable test for interaction of each factor with the cohort term (Metabolite_i ~ Factor_1 + Factor_2 + ... Factor_J + Factor_1*cohort + ... + Factor_J*cohort + cohort)
  • Selection of covariates for subsequent analyses of metabolites by removing factors not explaining a set amount of variance in at least one metabolite in at least one cohort via backwards selection until only factors meeting the explained variance criteria remain in the model
  • Visualization of results
  • Sample and feature-centric annotation
  • Download of results

Quick-Start

The App is hosted on the LHA-Servers here. Otherwise, it can be started directly from this repository via:

# to install shiny run:
# install.packages("shiny")
# load the Shiny package
library("shiny")

# Start the App directly through Github
runGitHub("Metabolite-Investigator", "cfbeuchel")

For local offline use the the application needs to be downloaded, the ZIP-file extracted an run like this:

# to install shiny run:
# install.packages("shiny")
# load the Shiny package
library("shiny")

# start the App from the previously downloaded folder, e.g.
runApp("C:\Users\cfbeuchel\Downloads\Metabolite-Investigator-master")

# or on unix based systems for example:
runApp("/home/cfbeuchel/Downloads/Metabolite-Investigator-master")

Replace the directory within the brackets with location of the folder on your system. Make sure the path points to the folder containing the app.R, server.R and ui.R scripts.

The App comes with example data from two cohorts that may be used to try out the functionality. Press the Use Example Data button to load the data and try out the application.

Docker Archive

For backwards-compatibility, we also offer a docker archive of previous versions of the app on GitLab (starting from Version 0.1.6). These docker-images can be pulled from the archive and run within a working docker environmnent as follows:

  1. Go to https://gitlab.com/imise-genstat/metabolite-investigator-archive/container_registry/1612096
  2. Look for a tagged version you would like to run using docker
  3. The download link for the docker command is available at the "clipboard"-symbol next to the tag-name (e.g. 0.1.6)
  4. Use the docker pull command to download the selected image to your computer
  5. Run a local version of the downloaded image
# Using the initial release version 0.1.6 as an example: 
docker pull registry.gitlab.com/imise-genstat/metabolite-investigator-archive:0.1.6
docker run -it -p 3838:3838 registry.gitlab.com/imise-genstat/metabolite-investigator-archive:0.1.6

Requirements

The app requires an up-to-date R installation as well as the following packages:

  • shiny (install via CRAN - install.packages("shiny"))
  • DT (install via CRAN - install.packages("DT"))
  • BiocManager (install via CRAN - install.packages("BiocManager"))
  • sva (install via Bioconductor)
  • data.table (install via CRAN - install.packages("data.table"))
  • visNetwork (install via CRAN - install.packages("visNetwork"))
  • magrittr (install via CRAN - install.packages("magrittr"))
  • ggplot2 (install via CRAN - install.packages("ggplot2"))
  • corrplot (install via CRAN - install.packages("corrplot"))
  • scales (install via CRAN - install.packages("scales"))

References

This App could only be programmed by using these freely available tools:

metabolite-investigator's People

Contributors

cfbeuchel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

metabolite-investigator's Issues

toolboxH dependency

There is a dependency to the toolboxH package somewhere in the univariable association step. This should be found and removed.

Remove dependency

I want to remove the dependency to the stringr package in the univariable_assoc() function. It's probably unnecessary.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.