plot.ehh: Plot EHH around a focal marker

Description Usage Arguments See Also Examples

View source: R/plot.ehh.R

Description

Plot curve of EHH values around a focal marker.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## S3 method for class 'ehh'
plot(
  x,
  ylim = c(0, 1),
  type = "l",
  main = paste0("EHH around '", x$mrk.name, "'"),
  xlab = "Position",
  ylab = "Extended Haplotype Homozygosity",
  col = c("blue", "red", "violet", "orange"),
  mrk.col = "gray",
  bty = "n",
  legend = NA,
  legend.xy.coords = "automatic",
  ...
)

Arguments

x

data (output of calc_ehh).

ylim

the y limits of the plot

type

plot type (see codeplot.default and matplot). Type "s" or "S" yield both (the same) piecewise constant curve.

main

title for the plot (default NA, i.e. none).

xlab

title for the x-axis.

ylab

title for the y-axis.

col

color for the ancestral and derived alleles (respectively) curves.

mrk.col

color of the vertical line at the focal marker position.

bty

box type around plot (see par).

legend

legend text.

legend.xy.coords

if "automatic" (default) places legend either top left or top right; if "none", no legend is drawn; otherwise the argument is passed to legend.

...

further arguments to be passed to function matplot.

See Also

data2haplohh, calc_ehh, plot.ehhs, scan_hh.

Examples

1
2
3
4
5
6
7
#example haplohh object (280 haplotypes, 1424 SNPs)
#see ?haplohh_cgu_bta12 for details
data(haplohh_cgu_bta12)
#computing EHH statistics for the marker "F1205400"
#which displays a strong signal of selection
ehh <- calc_ehh(haplohh_cgu_bta12, mrk = "F1205400")
plot(ehh)

Example output



rehh documentation built on Sept. 15, 2021, 5:06 p.m.