Skip to content
This repository has been archived by the owner on Sep 21, 2020. It is now read-only.

elifesciences-publications/timshel-2020

 
 

Repository files navigation

This code is associated with the paper from Timshel et al., "Genetic mapping of etiologic brain cell types for obesity". eLife, 2020. http://doi.org/10.7554/eLife.55851

Mapping heritability of obesity by cell types

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

Timshel (bioRxiv, 2020): Mapping heritability of obesity by cell types

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 'Mapping heritability of obesity by cell types' (Timshel, bioRxiv 2020)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 80.9%
  • Jupyter Notebook 16.4%
  • Shell 1.8%
  • Python 0.9%