iplotPXG: Interactive phenotype x genotype plot

Description Usage Arguments Details Value See Also Examples

View source: R/iplotPXG.R

Description

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

Usage

1
2
3
4
5
6
7
8
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

1
2
3
4
5
6
7
8
library(qtl)
data(hyper)
marker <- sample(markernames(hyper), 1)

iplotPXG(hyper, marker)

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

qtlcharts documentation built on Jan. 8, 2022, 1:06 a.m.