Annotate Manhattan or Miami Plot
Usage
labelManhattan(
chr,
pos,
name,
gwas,
gwasChrLab = "chr",
gwasPosLab = "pos",
gwasPLab = "p",
gwasZLab = "NULL",
chrmaxpos,
textPos = 4,
angle = 0,
miamiBottom = FALSE
)Arguments
- chr
A vector of chromosomes for the markers to be labelled.
- pos
A vector of positions on the chromosome for the markers to be labelled. These must correspond to markers in the GWAS dataset used to make the manhattan plot.
- name
A vector of labels to be added next to the points specified by
chrandpos.- gwas
The same GWAS dataset used to plot the existing Manhattan or Miami plot to be annotated.
- gwasChrLab
The name of the column in
gwascontaining chromosome number. Defaults to "chr".- gwasPosLab
The name of the column in
gwascontaining position. Defaults to "pos".- gwasPLab
The name of the column in
gwascontaining p-values. Defaults to "p".- gwasZLab
The name of the column in
gwascontaining z-values. Defaults to "NULL".- chrmaxpos
Data frame containing x coordinates for chromosome start positions, generated by
labelManhattan.- textPos
An integer or vector dictating where the label should be plotted relative to each point. Good for avoiding overlapping labels. Provide an integer to plot all points in the same relative position or use a vector to specify position for each label. Passed to the pos option of
graphics::text. Defaults to 4.- angle
An integer or vector dictating the plot angle of the label for each point. rovide an integer to plot all points in the same relative position or use a vector to specify position for each label.Passed to the srt option of
graphics::text. Defaults to 0.- miamiBottom
If TRUE, labels will be plotted on the lower region of a Miami plot. If FALSE, labels will be plotted on the upper region. Defaults to FALSE.
Details
Add labels beside specified points on a Manhattan or Miami plot. Ideal for adding locus names to peaks. Currently only designed to work with miamiplot2.