Learn R Programming

GeneSelectMMD (version 2.16.0)

plotHistDensity: Plot of histogram and density estimate of the pooled gene expression levels.

Description

Plot of histogram of pooled gene expression levels, composited with density estimate based on the mixture of marginal distributions. The density estimate is based on the assumption that the marginal correlations between subjects are zero.

Usage

plotHistDensity(obj.gsMMD, plotFlag="case", plotComponent=FALSE, myxlab="expression level", myylab="density", mytitle="Histogram of gene expression levels\nimposed with estimated density (case)", x.legend=NULL, y.legend=NULL, numPoints=500, mycol=1:4, mylty=1:4, mylwd=rep(3,4), cex.main=2, cex.lab=1.5, cex.axis=1.5, cex=2, bty="n")

Arguments

obj.gsMMD
an object returned by gsMMD, gsMMD.default, gsMMD2, or gsMMD2.default
plotFlag
logical. Indicate the plot will based on which type of subjects.
plotComponent
logical. Indicate if components of the mixture of marginal distribution will be plotted.
myxlab
label for x-axis
myylab
label for y-axis
mytitle
title of the plot
x.legend
the x-corrdiates of the legend
y.legend
the y-corrdiates of the legend
numPoints
logical. Indicate how many genes will be plots.
mycol
color for the density estimates (overall and components)
mylty
line styles for the density estimates (overall and components)
mylwd
line width for the density estimates (overall and components)
cex.main
font for main title
cex.lab
font for x- and y-axis labels
cex.axis
font for x- and y-axis
cex
font for texts
bty
the type of box to be drawn around the legend. The allowed values are '"o"' and '"n"' (the default).

Value

A list containing coordinates of the density estimates:
x
sorted pooled gene expression levels for cases or controls.
x2
a subset of x specified by the sequence: seq(from=1,to=len.x, by=delta), where len.x is the length of the vector x, and delta=floor(len.x/numpoints).
y
density estimate corresponding to x2
y1
weighted density estimate for gene cluster 1
y2
weighted density estimate for gene cluster 2
y3
weighted density estimate for gene cluster 3

Details

For a given type of subjects, we pool their expression levels together if the marginal correlations among subjects are zero. We then draw a histogram of the pooled expression levels. Next, we composite density estimates of gene expression levels for the overal distribution and the 3 component distributions.

References

Qiu, W.-L., He, W., Wang, X.-G. and Lazarus, R. (2008). A Marginal Mixture Model for Selecting Differentially Expressed Genes across Two Types of Tissue Samples. The International Journal of Biostatistics. 4(1):Article 20. http://www.bepress.com/ijb/vol4/iss1/20

Examples

Run this code
  ## Not run: 
#     library(ALL)
#     data(ALL)
#     eSet1 <- ALL[1:100, ALL$BT == "B3" | ALL$BT == "T2"]
#     
#     mem.str <- as.character(eSet1$BT)
#     nSubjects <- length(mem.str)
#     memSubjects <- rep(0,nSubjects)
#     # B3 coded as 0 (control), T2 coded as 1 (case)
#     memSubjects[mem.str == "T2"] <- 1
#     
#     obj.gsMMD <- gsMMD(eSet1, memSubjects, transformFlag = TRUE, 
#       transformMethod = "boxcox", scaleFlag = TRUE, quiet = FALSE)
#   
#     plotHistDensity(obj.gsMMD, plotFlag = "case", 
#         mytitle = "Histogram of gene expression levels for T2\nimposed with estimated density (case)", 
#         plotComponent = TRUE, 
#         x.legend = c(0.8, 3), 
#         y.legend = c(0.3, 0.4), 
#         numPoints = 500)
#   ## End(Not run)

Run the code above in your browser using DataLab