plot.IBDprob | R Documentation |
Creates a plot for an object of class IBDprob
. Six types of plot can
be made:
singleGeno
A plot for a single genotype showing the IBD
probabilities for all parents across the genome.
allGeno
A plot showing for all genotypes the IBD
probabilities of the parent with the highest probability per marker.
pedigree
A plot showing the structure of the pedigree of
the population.
map
A plot of the genetic map showing the length of the
chromosomes and the positions of the markers.
meanProbs
A plot showing the coverage of each parent across
the population.
totalCoverage
A plot showing the total coverage of each
parent.
## S3 method for class 'IBDprob'
plot(
x,
...,
plotType = c("singleGeno", "allGeno", "pedigree", "map", "meanProbs", "totalCoverage"),
genotype,
chr = NULL,
title = NULL,
output = TRUE
)
x |
An object of class |
... |
Further arguments. Unused. |
plotType |
A character string indicating the type of plot that should be made. |
genotype |
A character string indicating the genotype for which the
plot should be made. Only for |
chr |
A character vector indicating the chromosomes to which the
coverage should be restricted. Only for |
title |
A character string, the title of the plot. |
output |
Should the plot be output to the current device? If
|
A ggplot object is invisibly returned.
## Not run:
## Compute IBD probabilities for Steptoe Morex.
## Add extra evaluation positions in between exiting marker positions
## to assure evaluation positions are at most 2 cM apart.
SxMIBD_Ext <- calcIBD(popType = "DH",
markerFile = system.file("extdata/SxM", "SxM_geno.txt",
package = "statgenIBD"),
mapFile = system.file("extdata/SxM", "SxM_map.txt",
package = "statgenIBD"),
evalDist = 2)
## Plot results for genotype dh005.
plot(SxMIBD_Ext,
plotType = "singleGeno",
genotype = "dh005")
## Plot results for all genotypes.
plot(SxMIBD_Ext,
plotType = "allGeno")
## Plot structure of the pedigree.
plot(SxMIBD_Ext,
plotType = "pedigree")
## Plot genetic map.
plot(SxMIBD_Ext,
plotType = "map")
## Plot coverage across population.
plot(SxMIBD_Ext,
plotType = "meanProbs")
## Plot total coverage.
plot(SxMIBD_Ext,
plotType = "totalCoverage")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.