Generate a manhattan plot for an rvatResult object.

manhattan(
  object,
  highlight = NULL,
  label = "label",
  threshold = NULL,
  labelThreshold = NULL,
  labelRepel = FALSE,
  labelSize = NULL,
  contigs = c(),
  title = ""
)

Arguments

object

rvatResult object.

highlight

vector of units/VAR_ids that should be highlighted in red

label

Column name of the labels that are used for significant results

threshold

Fwe threshold (bonferroni applied by default).

labelThreshold

P-value threshold to display labels.

labelRepel

Should the text labels repel away from each other and away from the data points? Defaults to FALSE.

labelSize

Size of the label, defaults to the default used in the ggrepel package.

contigs

Update contig lengths from GRCh37 defaults.

title

Optional title.

Examples

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")