sinarueeger / ldsc-corrplot-rg

corrplot of LDSC genetic correlation results

Home Page:https://www.nature.com/articles/s41588-018-0047-6

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

corrplot of LDSC genetic correlation results

Overview

This repo provides our script to reproduce genetic correlation corrplot (Fig. 2) based on bivariate LD score regression results (Kanai, M. et al., Nat. Genet. 2018).

Requirements

  • R with dplyr and our modified version of corrplot (mkanai/corrplot).
install.packages("dplyr")
devtools::install_github("mkanai/corrplot")

Genetic correlation plot (Fig. 2)

We modified corrplot to visualize pairwise genetic correlations estimated via bivariate LD score regression. Larger squares correspond to more significant FDRs (corrplot(method = 'psquare', p.mat = p.mat, ...)). Significant correlations (FDR < 0.05) are indicated by asterisks (corrplot(sig = 'pch', sig.level = 0.05, pch = '*')).

Usage

Rscript plot_corrplot_rg.R input_example/input_rg.txt input_example/traitlist.txt

Input: Genetic correlations (input_rg.txt)

This file provides a list of all pairwise genetic correlations estimated via ldsc software. The script expects all rows are unique (i.e., one row per each pair of traits). The required fields are as follows:

  • p1_category: Trait category of trait 1
  • p1: Trait 1
  • p2_category: Trait category of trait 2
  • p2: Trait 2
  • rg: Genetic correlation
  • p: P-value
  • q: FDR q-value

Input: Trait list (traitlist.txt)

This file provides a list of traits and their categories. It defines a color of each category in a figure. The required fields are as follows:

  • CATEGORY: Trait category
  • TRAIT: Trait name
  • COLOR: Category color

Output

An example output is shown below. To get the published figure, we edited a pdf output using Adobe Illustrator.

Citation

The original corrplot package:

The example data and published figure:

  • Kanai, M., et al. Genetic analysis of quantitative traits in the Japanese population links cell types to complex human diseases. Nat. Genet. 50, 390–400 (2018). doi:10.1038/s41588-018-0047-6

Contact

Masahiro Kanai (mkanai@g.harvard.edu)

http://mkanai.github.io/

Links

About

corrplot of LDSC genetic correlation results

https://www.nature.com/articles/s41588-018-0047-6

License:GNU General Public License v3.0


Languages

Language:R 100.0%