iplotPXG: Interactive phenotype x genotype plot

View source: R/iplotPXG.R

iplotPXGR Documentation

Interactive phenotype x genotype plot

Description

Creates an interactive graph of phenotypes vs genotypes at a marker.

Usage

iplotPXG(
  cross,
  marker,
  pheno.col = 1,
  chartOpts = NULL,
  fillgenoArgs = NULL,
  digits = 5
)

Arguments

cross

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

marker

Character string with marker name.

pheno.col

Phenotype column in cross object.

chartOpts

A list of options for configuring the chart. Each element must be named using the corresponding option.

fillgenoArgs

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

digits

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

Details

The function [qtl::fill.geno()] is used to impute missing genotypes, with arguments 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) are taken from the input 'cross' object, using the [qtl::getid()] function in R/qtl.

By default, points are colored blue and pink according to whether the marker genotype is observed or inferred, respectively.

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

[idotplot()], [iplot()], [iplotScanone()], [iplotMap()]

Examples

library(qtl)
data(hyper)
marker <- sample(markernames(hyper), 1)

iplotPXG(hyper, marker)

# different colors
iplotPXG(hyper, marker, chartOpts=list(pointcolor=c("black", "gray")))


kbroman/qtlcharts documentation built on May 10, 2023, 6:07 p.m.