plot.haplohh {rehh} | R Documentation |
Plot the variants of a haplohh object
Description
Plot the variants of a haplohh object. This method is intended for visualization of very small data sets such as the examples provided by the package.
Usage
## S3 method for class 'haplohh'
plot(
x,
mrk = NA,
allele = NA,
group_by_allele = FALSE,
ignore.distances = FALSE,
col = c("blue", "red", "violet", "orange"),
linecol = "gray",
mrk.col = "gray",
pch = 19,
cex = 1,
lwd = 1,
hap.names = NULL,
mrk.names = NULL,
cex.lab.hap = 0.8,
cex.lab.mrk = 0.8,
family.lab = "",
offset.lab.hap = 0.5,
offset.lab.mrk = 0.25,
pos.lab.hap = "left",
pos.lab.mrk = "top",
srt.hap = 0,
srt.mrk = 0,
highlight.mrk = NULL,
highlight.mrk.col = c("lightgray", "black", "darkgray"),
...
)
Arguments
x |
an object of class |
mrk |
the focal marker. Used only, if alleles are grouped or (de-)selected. |
allele |
if |
group_by_allele |
logical. If |
ignore.distances |
logical. If |
col |
color for each allele (as coded internally). |
linecol |
the color of the background lines. If more than one color is specified and sequences sorted by the marker allele, the specified colors are used to distinguish the alleles; otherwise consecutive sequences are set into the specified colors. |
mrk.col |
color of the vertical line at the focal marker position. |
pch |
symbol used for markers. See |
cex |
relative size of marker symbol. See |
lwd |
line width. |
hap.names |
a vector containing the names of chromosomes. |
mrk.names |
a vector containing the names of markers. |
cex.lab.hap |
relative letter size of haplotype labels. See |
cex.lab.mrk |
relative letter size of marker labels. See |
family.lab |
font family for labels. See |
offset.lab.hap |
offset of haplotype labels. See |
offset.lab.mrk |
offset of marker labels. See |
pos.lab.hap |
position of haplotype labels. Either |
pos.lab.mrk |
position of marker labels. Either |
srt.hap |
rotation of haplotype labels (see |
srt.mrk |
rotation of marker labels (see |
highlight.mrk |
vector of markers to be highlighted |
highlight.mrk.col |
color for each allele (as coded internally) at highlighted markers. |
... |
other parameters to be passed to |
Details
Specifying a haplohh-object with more than 4096 haplotypes or markers produces an error.
See Also
Examples
#example haplohh object
make.example.files()
hh <- data2haplohh(hap_file = "example1.hap",
map_file = "example1.map",
allele_coding = "01")
plot(hh)
hh <- data2haplohh(hap_file = "example2.hap",
map_file = "example2.map",
allele_coding = "01",
min_perc_geno.mrk = 50)
plot(hh)
remove.example.files()