gtable_ld_associations: Gtable of linkage disequilibrium and associations

View source: R/gtable_associations.R

gtable_ld_associationsR Documentation

Gtable of linkage disequilibrium and associations

Description

Creates a gtable of a linkage disequilibrium, chromosomic positions, and association scores ggplots.

Usage

gtable_ld_associations(
  df_assocs,
  df_ld,
  pvalue_colname = "pvalues",
  labels_colname = "probe_id",
  n_labels = 5,
  diamonds = nrow(df_assocs) <= 40,
  linked_area = diamonds,
  point_size = 150/nrow(df_assocs),
  colors = snp_position_colors(nrow(df_assocs)),
  ...
)

Arguments

df_assocs

SNP annotation data frame with columns chromosome, position, and as specified by parameters pvalue_colname and optionally labels_colname.

df_ld

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

pvalue_colname

Column name of df_snp with association values

labels_colname

Optional column name of df_snp with labels. Set NULL to remove labels.

n_labels

Number of labels of most associated SNPs to display.

diamonds

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

linked_area

Add a linked area to associations points. Default same as diamonds.

point_size

Point size for ggplot_ld, ignored if diamonds is TRUE.

colors

Colors of SNPs

...

Passed to ggplot_associations

Value

gtable


snplinkage documentation built on Sept. 11, 2024, 6:02 p.m.