plot.HaploFreq {optiSel}R Documentation

Plots Frequencies of Haplotype Segments in Specified Breeds

Description

For a particular haplotype from thisBreed and each marker m the frequency of the segment containing marker m in a specified reference breed is plotted.

Usage

## S3 method for class 'HaploFreq'
plot(x, ID=1, hap=1, refBreed=NULL, Chr=NULL, show.maxFreq=FALSE, ...)

Arguments

x

This is either an R-Object obtained with function haplofreq or a list obtained with function freqlist.

ID

Either the ID of the animal from this breed to be plotted, or the position of the animal in R-Object x.

hap

Number of the haplotype to be plotted (1 or 2)

refBreed

Breed name. The frequencies the haplotype segments have in this reference breed will be plotted. Parameter refBreeds="others" means that the maximum frequency will be plotted the segments have in other breeds.

Chr

Vector with chromosomes to be plotted. The default means that all chromosomes will be plotted.

show.maxFreq

If show.maxFreq=TRUE then a peak of the grey curve means that a haplotype segment exist in the breed which has high frequency in one of the reference breeds. This frequency is shown. The default is FALSE.

...

Arguments to be passed to methods, such as graphical parameters.

Details

For a particular haplotype from thisBreed and each marker m from chromosomes Chr the frequency of the segment containing marker m in reference breed refBreed is plotted (red line), as well as the maximum frequency the segment has in one of the evaluated breeds (black line), and the maximum frequency a segment from thisBreed has in one of the evaluated breeds (grey area, if show.maxFreq=TRUE).

Value

No return value, called for plotting.

Author(s)

Robin Wellmann

Examples

data(map)
data(Cattle)
dir   <- system.file("extdata", package="optiSel")
files <- paste(dir, "/Chr", 1:2, ".phased", sep="")

Freq <- freqlist(
  haplofreq(files, Cattle, map, thisBreed="Angler", refBreeds="Rotbunt",   minSNP=20),
  haplofreq(files, Cattle, map, thisBreed="Angler", refBreeds="Holstein",  minSNP=20),
  haplofreq(files, Cattle, map, thisBreed="Angler", refBreeds="Fleckvieh", minSNP=20)
  )

names(Freq)

plot(Freq, ID=1, hap=2, refBreed="Rotbunt")

Freq <- haplofreq(files, Cattle, map, thisBreed="Angler", refBreeds="others",   minSNP=20)

plot(Freq, ID=1, hap=2)
plot(Freq, ID=1, hap=2, show.maxFreq=TRUE)

Freq <- haplofreq(files, Cattle, map, thisBreed="Angler", refBreeds="Angler",   minSNP=20)
plot(Freq, ID=1, hap=2)


[Package optiSel version 2.0.9 Index]