plotEGclass {lineup}R Documentation

Plot classifier of eQTL genotype from expression data

Description

Diagnostic plot of one of the eQTL classifiers from the results of disteg(): generally expression phenotype against observed eQTL genotype, colored by inferred eQTL genotype.

Usage

plotEGclass(
  d,
  eqtl = 1,
  outercol = "inferred",
  innercol = "observed",
  thecolors = c("#7B68ED", "#1B9E78", "#CA3767", "#E59E00"),
  ...
)

Arguments

d

Output of disteg().

eqtl

Numeric index or a character vector (of the form "1@102.35") indicating the eQTL to consider.

outercol

Indicates how to color the outer edge of the points: "observed" indicates to color based on observed genotypes; "inferred" indicates to color based on inferred genotypes; otherwise, give a color.

innercol

Like outercol, but indicating the interior of the points.

thecolors

The colors to use in the plot. The last element (after the number of genotypes) indicates the color to use for missing values.

...

Passed to base::plot() and graphics::points().

Details

The function produces a diagnostic plot for studying one of the k-nearest neighbor classifiers underlying the output from disteg().

In the case of one expression phenotype attached to the selected eQTL, the plot is a dot plot of gene expression against observed eQTL genotype.

In the case of two expression phenotypes, the plot is a scatterplot of the two expression phenotypes against each other.

In the case of more than two expression phenotypes, we use graphics::pairs() to produce a matrix of scatterplots.

Value

None.

Author(s)

Karl W Broman, broman@wisc.edu

See Also

disteg(), plot.lineupdist(), plot2dist(), class::knn()

Examples

library(qtl)

# load example data
data(f2cross, expr1, pmap, genepos)


# calculate QTL genotype probabilities
f2cross <- calc.genoprob(f2cross, step=1)

# find nearest pseudomarkers
pmark <- find.gene.pseudomarker(f2cross, pmap, genepos)

# line up individuals
id <- findCommonID(f2cross, expr1)

# calculate LOD score for local eQTL
locallod <- calc.locallod(f2cross[,id$first], expr1[id$second,], pmark)

# take those with LOD > 25
expr1s <- expr1[,locallod>25,drop=FALSE]

# calculate distance between individuals
#     (prop'n mismatches between obs and inferred eQTL geno)
d <- disteg(f2cross, expr1s, pmark)

# plot of classifier for and second eQTL
par(mfrow=c(2,1), las=1)
plotEGclass(d)
plotEGclass(d, 2)


[Package lineup version 0.44 Index]