ggplot_ld: Ggplot linkage disequilibrium

View source: R/ggplots_ld.R

ggplot_ldR Documentation

Ggplot linkage disequilibrium

Description

Display SNP r2 correlations using points or diamonds with text.

Usage

ggplot_ld(
  df_ld,
  diamonds = length(unique(df_ld$SNP_A)) < 40,
  point_size = 120/sqrt(nrow(df_ld)),
  reverse = FALSE,
  reindex = TRUE
)

Arguments

df_ld

Data frame with columns SNP_A, SNP_B, and R2. As returned by the snprelate_ld function.

diamonds

Should the values be displayed as diamonds or points ? Default is TRUE for less than 40 SNPs.

point_size

Size for geom_point. Ignored if diamonds is TRUE.

reverse

Reverse the display (horizontal symmetry)

reindex

If FALSE, SNPs are positionned following their IDs

Value

ggplot


snplinkage documentation built on May 4, 2023, 9:09 a.m.