ggplot_associations: Ggplot associations

View source: R/gtable_associations.R

ggplot_associationsR Documentation

Ggplot associations

Description

Get SNPs associations ggplot, either as points or as a linked area. Optionally add labels to most associated points using ggrepel.

Usage

ggplot_associations(
  df_snp,
  pvalue_colname = "pvalues",
  labels_colname = "probe_id",
  n_labels = 10,
  nudge = c(0, 1),
  linked_area = FALSE,
  byindex = linked_area,
  colors = if (linked_area) snp_position_colors(nrow(df_snp)) else "black"
)

Arguments

df_snp

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

pvalue_colname

Column name of df_snp with association values

labels_colname

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

n_labels

Number of labels of most associated points to display.

nudge

Nudge parameter passed to ggrepel::geom_label_repel.

linked_area

Add a linked area to associations points, default FALSE

byindex

Display by SNP index or chromosomic position (default)

colors

Colors of SNPs

Value

ggplot


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