manhattan.RdGenerate a manhattan plot for an rvatResult object.
manhattan(
object,
highlight = NULL,
label = NULL,
threshold = NULL,
labelThreshold = NULL,
labelRepel = FALSE,
labelSize = 3.88,
contigs = NULL,
title = "",
verbose = TRUE
)rvatResult object.
vector of units/VAR_ids that should be highlighted in red
Column name of the labels that are used for significant results. If not provided, the function attempts to use a column named "label" if one is present.
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 3.88.
Update contig lengths from GRCh37 defaults. Can be a character string (e.g. "GRCh38") or a data.frame with 'CHROM' and 'Length' columns. If not specified, the function attempts to infer the genome build from the object metadata, defaulting to GRCh37 if identifying information is missing.
Optional title.
Should the function be verbose? Defaults to TRUE.
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"
)