iplotScanone: Interactive LOD curve

View source: R/iplotScanone.R

iplotScanoneR Documentation

Interactive LOD curve

Description

Creates an interactive graph of a single-QTL genome scan, as calculated by qtl::scanone(). If cross is provided, the LOD curves are linked to a phenotype x genotype plot for a marker: Click on a marker on the LOD curve and see the corresponding phenotype x genotype plot.

Usage

iplotScanone(
  scanoneOutput,
  cross = NULL,
  lodcolumn = 1,
  pheno.col = 1,
  chr = NULL,
  pxgtype = c("ci", "raw"),
  fillgenoArgs = NULL,
  chartOpts = NULL,
  digits = 5
)

Arguments

scanoneOutput

Object of class "scanone", as output from qtl::scanone().

cross

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

lodcolumn

Numeric value indicating LOD score column to plot.

pheno.col

(Optional) Phenotype column in cross object.

chr

(Optional) Vector indicating the chromosomes for which LOD scores should be calculated. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding - to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.

pxgtype

If phenotype x genotype plot is to be shown, should it be with means \pm 2 SE ("ci"), or raw phenotypes ("raw")?

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.)

Details

If cross is provided, 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").

With pxgtype="raw", individual IDs (viewable when hovering over a point in the phenotype-by-genotype plot) are taken from the input cross object, using the qtl::getid() function in R/qtl.

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.

See Also

iplotMScanone(), iplotPXG(), iplotMap()

Examples

library(qtl)
data(hyper)
hyper <- calc.genoprob(hyper, step=1)
out <- scanone(hyper)

# iplotScanone with no effects
iplotScanone(out, chr=c(1, 4, 6, 7, 15))


# iplotScanone with CIs
iplotScanone(out, hyper, chr=c(1, 4, 6, 7, 15))


# iplotScanone with raw phe x gen
iplotScanone(out, hyper, chr=c(1, 4, 6, 7, 15),
             pxgtype='raw')


qtlcharts documentation built on June 19, 2026, 5:07 p.m.