Skip to contents

This function visualizes GWAS results (Z-score, -log10(p), or cs.pratt) with fine-mapping annotations derived from a credible-set summary table. It supports SNP/Gene distinction via shapes and uses ggsci scientific color palettes.

Usage

plot_tgvis(
  gwas_df,
  summary_df,
  cs.pratt_thres = 0.1,
  y = c("z", "p", "cs.pratt"),
  palette = c("locuszoom", "npg", "lancet", "jco", "nejm", "d3", "ucscgb", "aaas", "igv",
    "cosmic", "uchicago", "tron", "rickandmorty", "futurama", "simpsons")
)

Arguments

gwas_df

A data frame containing at least: SNP, Zscore, p, CHR, and BP.

summary_df

A data frame with fine-mapping summary, containing columns: variable, cs, cs.pip, cs.pratt, xqtl, type.

cs.pratt_thres

Numeric. Pratt index threshold for labeling and dashed line (default: 0.1).

y

Character. One of "z", "p", or "cs.pratt" to determine y-axis variable.

palette

Character. ggsci color palette name. Default is "locuszoom".

Value

A ggplot object.