gtable_ld: Gtable of linkage disequilibrium and chromosomic positions

View source: R/gtable_ld.R

gtable_ldR Documentation

Gtable of linkage disequilibrium and chromosomic positions

Description

Creates a gtable of linkage disequilibrium and chromosomic positions ggplots. A biplot_subset parameter is available to add a second linkage disequibrium ggplot to visualize the effect of a SNP selection.

Usage

gtable_ld(
  df_ld,
  df_snp,
  biplot_subset = NULL,
  labels_colname = NULL,
  diamonds = length(unique(df_ld$SNP_A)) < 40,
  point_size = ifelse(is.null(biplot_subset), 120, 80)/sqrt(nrow(df_ld)),
  title = "",
  title_biplot = "",
  ...
)

Arguments

df_ld

Data frame returned by snprelate_ld

df_snp

SNP annotations with columns snpID and position

biplot_subset

SNP indexes of the subset for the second ld plot

labels_colname

Column name of df_snp to use as SNP labels

diamonds

Display the values as diamonds or as points Default is TRUE for less than 40 SNPs.

point_size

Size for geom_point. Ignored if diamonds is TRUE.

title

Plot title

title_biplot

Optional biplot title

...

Passed to ggplot_ld

Value

gtable of ggplots


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