Manhattanplot of iHS, XP-EHH or Rsb over a genome.
manhattanplot(
data,
pval = FALSE,
threshold = c(-2, 2),
chr.name = NA,
cr = NULL,
cr.col = "gray",
cr.opacity = 0.5,
cr.lab.cex = 0.6,
cr.lab.offset = 0,
cr.lab.pos = "top",
mrk = NULL,
mrk.cex = 1,
mrk.col = "gray",
mrk.pch = 1,
mrk.lab.cex = 0.4,
mrk.lab.pos = 4,
ignore_sign = FALSE,
cex = 0.5,
las = 1,
pch = 20,
inset = 5e+06,
resolution = NULL,
...
)
logical. If TRUE
, the p-value is plotted, otherwise the score itself.
a horizontal line is added at the corresponding value(s), for instance to represent a significance threshold. A single value (upper or lower threshold) or two values (upper and lower) can be specified.
if NA
(default), all chromosomes are plotted, otherwise only those specified.
highlight "candidate regions" specified by a data.frame with columns CHR
, START
and END
as obtained by the function calc_candidate_regions
.
the color for highlighting
a value between 0 (invisible) and 1 (opaque).
text size of candidate region labels.
offset of candidate region labels.
if "top"
(default) or "bottom"
, candidate regions are labeled by numbers; to turn off, use "none"
highlight marker specified by a data.frame containing the
colums CHR
and POSITION
. The row names of that data frame are taken as labels.
Alternatively a vector with marker IDs can be specified. In the latter case the ID is used as label.
size of marker label.
color of the highlighted points.
type of the highlighted points.
text size of marker label. If zero, no labels are printed.
a position specifier for the text. Values of 1, 2, 3 and 4, respectively indicate positions below, to the left of, above and to the right of the highlighted marker.
logical. If TRUE
, absolute values are plotted.
size of the points representing markers in the plot(s) (see par
).
orientation of axis labels (see par
).
type of the points representing markers in the plot(s) (see points
).
inset (in bases) between chromosomes to avoid overlap of data points. Default: 5,000,000 bases.
Rasterize data points to the specified resolution and remove
duplicate points. Defaults to NULL, i.e. no rasterization. A typical value might be c(1E5, 0.01)
,
meaning that resolution on the x-axis (chromosomal position) is 100000 and on the y-axis (score or p-value) is 0.01.
further arguments to be passed to plot.default
.
The function returns a plot.
The color of chromosomes is taken from the "Graphics Palette", see palette
.
If a single chromosome is plotted, a genomic region can be specified by
argument xlim
.
Other statistics can be plotted as well, although a warning is issued. They must be given by a data.frame with columns CHR and POSITION and the statistic in the third column.
# NOT RUN {
library(rehh.data)
data(wgscan.cgu)
## results from a genome scan (44,057 SNPs)
## see ?wgscan.eut and ?wgscan.cgu for details
wgscan.ihs <- ihh2ihs(wgscan.cgu)
manhattanplot(wgscan.ihs)
# }
Run the code above in your browser using DataLab