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

Description Usage Arguments Details Value Note Author(s) References Examples

View source: R/visual.R

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
plotHistDensity(obj.gsMMD,
                plotFlag = "case",
                plotComponent = FALSE,
                myxlab = "expression level",
                myylab = "density",
                mytitle = "Histogram 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).

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.

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

Note

The density estimate is obtained based on the assumption that the marginal correlation among subjects is zero. If the estimated marginal correlation obtained by gsMMD is far from zero, then do not use this plot function.

Author(s)

Jarrett Morrow remdj@channing.harvard.edu, Weiliang Qiu Weiliang.Qiu@gmail.com, Wenqing He whe@stats.uwo.ca, Xiaogang Wang stevenw@mathstat.yorku.ca, Ross Lazarus ross.lazarus@channing.harvard.edu

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
  ## 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 for T2 imposed with estimated density (case)", 
    plotComponent  =  TRUE, 
    x.legend  =  c(0.8, 3), 
    y.legend  =  c(0.3, 0.4), 
    numPoints  =  500)
  
## End(Not run)

GeneSelectMMD documentation built on Nov. 8, 2020, 6:48 p.m.