manhattan.RdGenerate a manhattan plot for an rvatResult object.
manhattan(
object,
highlight = NULL,
label = "label",
threshold = NULL,
labelThreshold = NULL,
labelRepel = FALSE,
labelSize = NULL,
contigs = c(),
title = ""
)rvatResult object.
vector of units/VAR_ids that should be highlighted in red
Column name of the labels that are used for significant results
Fwe threshold (bonferroni applied by default).
P-value threshold to display labels.
Should the text labels repel away from each other and away from the data points? Defaults to FALSE.
Size of the label, defaults to the default used in the ggrepel package.
Update contig lengths from GRCh37 defaults.
Optional title.
library(rvatData)
data(rvbresults)
# generate manhatan plot
man <- manhattan(rvbresults[rvbresults$varSetName == "ModerateImpact" & rvbresults$test == "firth",],
label = "unit",
contigs = "GRCh38")
# if many overlapping gene label, try setting `labelRepel = TRUE`
man <- manhattan(rvbresults[rvbresults$varSetName == "ModerateImpact" & rvbresults$test == "firth",],
label = "unit",
labelRepel = TRUE,
contigs = "GRCh38")
# alter the significane threshold using the `threshold` parameter
man <- manhattan(rvbresults[rvbresults$varSetName == "ModerateImpact" & rvbresults$test == "firth",],
label = "unit",
labelRepel = TRUE,
threshold = 1e-5,
contigs = "GRCh38")
# the threshold for displaying labels can be set using the `labelTrheshold` parameter
man <- manhattan(rvbresults[rvbresults$varSetName == "ModerateImpact" & rvbresults$test == "firth",],
label = "unit",
labelRepel = TRUE,
labelThreshold = 1e-12,
contigs = "GRCh38")