View source: R/gtable_associations.R
ggplot_associations | R Documentation |
Get SNPs associations ggplot, either as points or as a linked area. Optionally add labels to most associated points using ggrepel.
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"
)
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 |
ggplot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.