plotEGclass: Plot classifier of eQTL genotype from expression data

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/plotEGclass.R

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

1
2
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 "[email protected]") 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 plot and 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 pairs to produce a matrix of scatterplots.

Value

None.

Author(s)

Karl W Broman, [email protected]

See Also

disteg, plot.lineupdist, plot2dist, knn

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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)

kbroman/lineup documentation built on April 3, 2018, 8:59 a.m.