Skip to content

Object caller for stochastically dependent and independent effect-size and meta-analysis of correlations in Python

Notifications You must be signed in to change notification settings

SegataLab/inverse_var_weight

Repository files navigation

Inverse Variance Weighting in python

Description

Provides two classes for inverse-variance weighting (binary outcome & correlation-based) including two estimators for covariance among correlated effect sizes.

Requires the following python libraries:

Plotting utility requires the following python libraries:

If you use conda, you can use the following command to create a specific environment with the above packages:

conda create -n "stats" python=3.11.11 statsmodels=0.14.4 scipy=1.14.1 numpy=1.26.4 pandas=2.2.3 matplotlib=3.9.2 seaborn=0.13.2

Analysis of "Gut microbes linked with metabolic health, nutrition and diet interventions"

Step 1: clone or download the repository and navigate the tools folder

git clone https://github.com/SegataLab/inverse_var_weight.git
cd inverse_var_weight/tool_scripts_scores

Step 2: run the fundamental analyses

This step will perform a set of analyses on over 7.800 public metagenomic samples linking the ZOE MB Health & ZOE MB Diet scores with BMI and multiple disease types.

First creates the necessary folders:

mkdir ../temporary ../bmi_pooled_analyses ../pooling_disease_meta_analyses

The run the Python script:

python ZOE_Score_Public_Data_Fundamental_Analyses.py

Step 3: perform pooled (meta-)analyses on the disease-related datasets, including accounting for correlated effect sizes

python diseased_pooled_analysis_weighted_scores.py

Step 4 (optional): plot disease analysis

python generate_disease_centred_main_image.py

About

Object caller for stochastically dependent and independent effect-size and meta-analysis of correlations in Python

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages