Skip to content

Code to reproduce analysis and figures for 'Genetic mapping of etiologic brain cell types for obesity' (Timshel, eLife 2020)

License

Notifications You must be signed in to change notification settings

perslab/timshel-2020

Repository files navigation

Genetic mapping of etiologic brain cell types for obesity

This repository contains code to reproduce analysis and figures in presented in:

Timshel (eLife, 2020): Genetic mapping of etiologic brain cell types for obesity

image

Steps to reproduce analysis

  1. Download and prepare single-cell expression datasets: src/prep-expr_datasets/<dataset>-preprocessing.R

  2. Perform CELLEX* ES precomputation: src/es/run_es_precalculation.ipynb

  3. Calculate CELLEX* ES: src/es/run_es_calculation.sh

  4. Run CELLECT analysis:

    CELLECT-LDSC config files in src/CELLECT-LDSC
    CELLECT-MAGMA using scripts in src/CELLECT-MAGMA

    Note that to run these analysis, you will have to download the relevant GWAS summary stats from the consortium hosting the files. We are not allowed to share (redistribute) the the summary statistics. Details on the GWAS summary stats and how they where 'munged' can be found in src/prep-gwas_munge/README-cmds_munge_sumstats.txt

  5. Generate figures and tables using the scripts in src/publication**

*Since finishing the manuscript, we have implemented CELLEX in Python available here. We recommend using Python CELLEX as it is easier to use for new users.

**For cross-platform portability we used renv to create a reproducible environment for the R code used to produce the figures/tables. You can install the environment (i.e. CRAN packages) by running

renv::restore(repos = c(CRAN = "https://cloud.r-project.org"),
              lockfile="./renv.lock")

(See the renv.lock file here.)

Additional repositories to reproduce analysis

Code to reproduce cell-type co-expression networks can be found here: 19-BMI-brain-wgcna

Code to reproduce 'obesity geneset' enrichment tests can be found here: 19-BMI-brain-genesettests

image

Figures and tables

All output figures (.pdf) and tables (.csv) are available in this repository: src/publication/figs and src/publication/tables.

About

Code to reproduce analysis and figures for 'Genetic mapping of etiologic brain cell types for obesity' (Timshel, eLife 2020)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published