Learn R Programming

rehh (version 3.2.2)

plot.furcation: Plots furcation trees around a focal marker

Description

Plots furcation trees around a focal marker

Usage

# S3 method for furcation
plot(
  x,
  allele = NA,
  col = c("blue", "red", "violet", "orange"),
  mrk.col = "gray",
  lwd = 0.1,
  hap.names = NULL,
  cex.lab = 1,
  family.lab = "",
  offset.lab = 0.5,
  legend = NA,
  legend.xy.coords = "automatic",
  ...
)

Arguments

x

an object of class furcation (see calc_furcation).

allele

If NA (default), furcation trees for all alleles of the focal marker are plotted, otherwise for the specified alleles. Alleles must be specified by their internal coding, i.e. '0' for ancestral resp. major allele, etc.

col

color for each allele (as coded internally).

mrk.col

color of the vertical line at the focal marker position.

lwd

controls the relative width of the diagram lines on the plot (default 0.1).

hap.names

a vector containing names of chromosomes.

cex.lab

relative size of labels. See par.

family.lab

font family for labels. See par.

offset.lab

offset of labels. 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 argument is passed to legend.

...

other arguments to be passed to plot.default.

See Also

plot.haplen.

Examples

Run this code
# NOT RUN {
#example haplohh object (280 haplotypes, 1424 SNPs)
#see ?haplohh_cgu_bta12 for details
data(haplohh_cgu_bta12)
#plotting furcation diagram for both ancestral and derived allele
#from the marker "F1205400"
#which display a strong signal of selection
f <- calc_furcation(haplohh_cgu_bta12, mrk = "F1205400")
plot(f)
plot(f, xlim = c(2e+07,3.5e+07))
plot(f, xlim = c(2.7e+07,3.1e+07))
plot(f, xlim = c(2.7e+07,3.1e+07), hap.names = hap.names(haplohh_cgu_bta12), cex.lab=0.3)
# }

Run the code above in your browser using DataLab