Description Usage Arguments Hidden graphics parameters Examples
Plot one individual's genome-wide genotypes
1 2 3 |
geno |
Imputed phase-known genotypes, as a list of matrices
(as produced by |
map |
Marker map (a list of vectors of marker positions). |
ind |
Individual to plot, either a numeric index or an ID. |
chr |
Selected chromosomes to plot; a vector of character strings. |
col |
Vector of colors for the different genotypes. |
na_col |
Color for missing segments. |
swap_axes |
If TRUE, swap the axes, so that the chromosomes run horizontally. |
border |
Color of outer border around chromosome rectangles. |
shift |
If TRUE, shift the chromosomes so they all start at 0. |
chrwidth |
Total width of rectangles for each chromosome, as a fraction of the distance between them. |
... |
Additional graphics parameters |
A number of graphics parameters can be passed via ...
. For
example, bgcolor
to control the background color.
These are not included as formal parameters in order to avoid
cluttering the function definition.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | # load data and calculate genotype probabilities
library(qtl2geno)
iron <- read_cross2(system.file("extdata", "iron.zip", package="qtl2geno"))
iron <- iron["146", ] # subset to individual 146
map <- insert_pseudomarkers(iron$gmap, step=1)
pr <- calc_genoprob(iron, map, error_prob=0.002)
# infer genotypes, as those with maximal marginal probability
m <- maxmarg(pr)
# guess phase
ph <- guess_phase(iron, m)
# plot phased genotypes
plot_onegeno(ph, map, shift=TRUE, col=c("slateblue", "Orchid"))
# this is more interesting for Diversity Outbred mouse data
## Not run:
file <- paste0("https://raw.githubusercontent.com/rqtl/",
"qtl2data/master/DOex/DOex.zip")
DOex <- read_cross2(file)
# subset to individuals labeled "232" and "256"
DOex <- DOex[c("232", "256"), ]
pr <- calc_genoprob(DOex, error_prob=0.002)
# infer genotypes, as those with maximal marginal probability
m <- maxmarg(pr, minprob=0.5)
# guess phase
ph <- guess_phase(DOex, m)
# plot phased genotypes
plot_onegeno(ph, DOex$gmap, shift=TRUE)
plot_onegeno(ph, DOex$gmap, ind="256", shift=TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.