Unified LocusComparer Plotting Function
locuscomparer.RdThis function serves as a single entry point for creating LocusComparer plots. It can generate individual scatter plots, LocusZoom plots, or combined plots.
Usage
locuscomparer(
data_coloc_exposure,
data_coloc_outcome,
SNP_causal_exposure,
type = c("combined", "scatter", "locuszoom"),
trait1_title = "exposure",
trait2_title = "outcome",
legend = TRUE,
legend_position = "bottomright"
)Arguments
- data_coloc_exposure
(data.frame) Data frame for exposure. Must have columns
snp,pval,position,LD.- data_coloc_outcome
(data.frame) Data frame for outcome. Must have columns
snp,pval.- SNP_causal_exposure
(string) rsID of the causal SNP to highlight.
- type
(string) Type of plot to generate: "combined", "scatter", or "locuszoom". Default is "combined".
- trait1_title
(string) Title for trait 1. Default "exposure".
- trait2_title
(string) Title for trait 2. Default "outcome".
- legend
(boolean) Show legend in scatter plots? Default TRUE.
- legend_position
(string) Legend position: "bottomright", "topright", "topleft".