Giter Club home page Giter Club logo

bbs-metaanalysis-bayes's Introduction

Bayesian metaanalysis of phenotype-genotype relationship in Bardet-Biedl Syndrome

This repository contains code and data accompanying the upcoming publication "Exploring the function of the BBSome using clinical data: Meta-analysis of genotype-phenotype associations in Bardet-Biedl Syndrome"

Contents of the files:

  • data folder, contains the main dataset and results of the frequentist analyses from the main manuscript
  • main_analysis.Rmd describes (both in accessible and a mathy way) the model reported in the main manuscript. Reproduces all of the Bayesian figures from the main manscript + some additional checks and insights
  • alternative_models.Rmd describes all alternative models we tried throughout the analysis and shows posterior predictive checks that guided our selection of the model for the main analysis
  • multiverse_analysis.Rmd compares how the main conclusions of the paper hold under all alternative models, both Bayesian and frequentist.
  • validation_dataset.Rmd code made to validate the findings on new data. We were later denied access to new data and the code here is discontinued.
  • master_document.Rmd includes the 3 Rmd files above to form a single document for journal submissions
  • master_document_with_validation.Rmd an alternative to mater_document.Rmd also including validation. Discontinued after we were denied access to the new dataset.
  • data_processing.R code to load and preprocess the dataset
  • models.R definitions of all models used in the analysis
  • models_funcs.R helper functions to easily fit the dataset with all models
  • plots.R code for all the fancy plots used in the analysis

Rerunning the analysis

To rerun, you need to install brms whic requires rstan. Installing rstan directly with install.package may fail on some systems - see https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started for more details.

The model fitting for the analyses may be time consuming. To avoid recomputing, fits are stored in the stored_fits directory, which is created on the fly. To save you time refitting, you can download the fits we used at: https://zenodo.org/record/3243270 (DOI: 10.5281/zenodo.3243270). Downloading the fits should also let you rerun the code without completely configuring rstan.

You can rerun the complete analysis be knitting master_document.Rmd, but the individual parts can also be executed/knitted separately.

main_analysis.Rmd is self-sufficient and can be run directly. It fits the main model, which should be relatively quick (20min - 1 hour).

alternative_models.Rmd is self-sufficient and can be run directly. This will fit a large number of relatively large models and may take upwards of a day even on a powerful machine.

To run multiverse_analysis.Rmd you need to run alternative_models.Rmd first (or download fitted models), but after that it is pretty quick.

bbs-metaanalysis-bayes's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.