Description Usage Arguments Hidden graphics parameters See Also Examples
Plot phenotype vs genotype for a single putative QTL and a single phenotype.
1 2 3 |
geno |
Vector of genotypes, as produced by
|
pheno |
Vector of phenotypes. |
sort |
If TRUE, sort genotypes from largest to smallest. |
SEmult |
If specified, interval estimates of the within-group
averages will be displayed, as |
pooledSD |
If TRUE and |
swap_axes |
If TRUE, swap the axes, so that the genotypes are on the y-axis and the phenotype is on the x-axis. |
jitter |
Amount to jitter the points horizontally, if a vector of length > 0, it is taken to be the actual jitter amounts (with values between -0.5 and 0.5). |
force_labels |
If TRUE, force all genotype labels to be shown. |
alternate_labels |
If TRUE, place genotype labels in two rows |
omit_points |
If TRUE, omit the points, just plotting the averages (and, potentially, the +/- SE intervals). |
... |
Additional graphics parameters, passed to |
A number of graphics parameters can be passed via ...
. For
example, bgcolor
to control the background color, and
seg_width
, seg_lwd
, and seg_col
to control the lines at the
confidence intervals. Further, hlines
, hlines_col
,
hlines_lwd
, and hlines_lty
to control the horizontal grid
lines. (Use hlines=NA
to avoid plotting horizontal grid lines.)
Similarly vlines
, vlines_col
, vlines_lwd
, and vlines_lty
for vertical grid lines. 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 | # load qtl2geno package for data and genoprob calculation
library(qtl2geno)
# read data
iron <- read_cross2(system.file("extdata", "iron.zip", package="qtl2geno"))
# insert pseudomarkers into map
map <- insert_pseudomarkers(iron$gmap, step=1)
# calculate genotype probabilities
probs <- calc_genoprob(iron, map, error_prob=0.002)
# inferred genotype at a 28.6 cM on chr 16
geno <- maxmarg(probs, map, chr=16, pos=28.6, return_char=TRUE)
# plot phenotype vs genotype
plot_pxg(geno, log10(iron$pheno[,1]), ylab=expression(log[10](Liver)))
# include +/- 2 SE intervals
plot_pxg(geno, log10(iron$pheno[,1]), ylab=expression(log[10](Liver)),
SEmult=2)
# plot just the means
plot_pxg(geno, log10(iron$pheno[,1]), ylab=expression(log[10](Liver)),
omit_points=TRUE)
# plot just the means +/- 2 SEs
plot_pxg(geno, log10(iron$pheno[,1]), ylab=expression(log[10](Liver)),
omit_points=TRUE, SEmult=2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.