Learn R Programming

snplinkage (version 1.2.0)

gtable_ld_associations: 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) 

Value

gtable

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