This repository contains code to reproduce analysis and figures in presented in:
Timshel (eLife, 2020): Genetic mapping of etiologic brain cell types for obesity
-
Download and prepare single-cell expression datasets:
src/prep-expr_datasets/<dataset>-preprocessing.R
-
Perform CELLEX* ES precomputation:
src/es/run_es_precalculation.ipynb
-
Calculate CELLEX* ES:
src/es/run_es_calculation.sh
-
Run CELLECT analysis:
CELLECT-LDSC config files in
src/CELLECT-LDSC
CELLECT-MAGMA using scripts insrc/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
-
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.)
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
All output figures (.pdf) and tables (.csv) are available in this repository: src/publication/figs and src/publication/tables.