Learn R Programming

qtlcharts (version 0.16)

ipleiotropy: Tool to explore pleiotropy

Description

Creates an interactive graph of a scatterplot of two phenotypes, plus optionally the LOD curves for the two traits along one chromosome, with a slider for selecting the locations of two QTL which are then indicated on the LOD curves and the corresponding genotypes used to color the points in the scatterplot.

Usage

ipleiotropy(
  cross,
  scanoneOutput = NULL,
  pheno.col = 1:2,
  lodcolumn = 1:2,
  chr = NULL,
  interval = NULL,
  fillgenoArgs = NULL,
  chartOpts = NULL,
  digits = 5
)

Arguments

cross

(Optional) Object of class `"cross"`, see [qtl::read.cross()].

scanoneOutput

(Optional) object of class `"scanone"`, as output from [qtl::scanone()].

pheno.col

Vector indicating two phenotype column in cross object; either numeric or character strings (the latter being the phenotype column names).

lodcolumn

Vector of two numeric values indicating LOD score columns to plot.

chr

A single chromosome ID, as a character string.

interval

A numeric vector of length 2, defining an interval that indicates what portion of the chromosome should be included.

fillgenoArgs

List of named arguments to pass to [qtl::fill.geno()], if needed.

chartOpts

A list of options for configuring the chart (see the coffeescript code). Each element must be named using the corresponding option.

digits

Round data to this number of significant digits before passing to the chart function. (Use NULL to not round.)

Value

An object of class `htmlwidget` that will intelligently print itself into HTML in a variety of contexts including the R console, within R Markdown documents, and within Shiny output bindings.

Details

[qtl::fill.geno()] is used to impute missing genotypes. In this case, arguments to [qtl::fill.geno()] are passed as a list, for example `fillgenoArgs=list(method="argmax", error.prob=0.002, map.function="c-f")`.

Individual IDs (viewable when hovering over a point in the scatterplot of the two phenotypes) are taken from the input `cross` object, using the [qtl::getid()] function in R/qtl.

See Also

[iplotScanone()], [iplotMScanone()], [iplotPXG()]

Examples

Run this code
# NOT RUN {
library(qtl)
data(fake.bc)
fake.bc <- calc.genoprob(fake.bc[5,], step=1) # select chr 5
out <- scanone(fake.bc, method="hk", pheno.col=1:2)
# }
# NOT RUN {
ipleiotropy(fake.bc, out)
# }
# NOT RUN {
# }
# NOT RUN {
# omit the LOD curves
ipleiotropy(fake.bc)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab