Dual-Flashlight Plot

Description

A function that draws a dual-flashlight plot, volcano plot, and plate correlation plot.

Usage

1
dualFlashlight.fn(result.df, wellName = "WELL_USAGE", x.name = "mean", y.name = "ssmd", sampleName = "Sample", sampleColor = "black", controls = NULL, controlColors = NULL, xlab = "Average Fold Change", ylab = "SSMD", main = "Dual-Flashlight Plot", x.legend = NA, y.legend = NA, cex.point = 1, cex.legend = 0.8, xat = NULL, xMark = NULL, yat = NULL, yMark = NULL, xLines = NULL, yLines = NULL)

Arguments

result.df

A data frame containing data or results from an HTS experiment. it must includes at least three columns for well name, x (e.g., average fold change in log) and y (e.g.,SSMD), respectively.

wellName

Name of the column in result.df indicating well names.

x.name

Name of the column in result.df indicating values for x-axis.

y.name

Name of the column in result.df indicating values for y-axis.

sampleName

The name of the well type indicating sample wells.

sampleColor

The color for sample wells.

controls

A vector including controls to be shown in the plot.

controlColors

A vector including the color of the controls to be shown in the plot. It must have the same length as 'controls'.

xlab

Same as internal function 'plot'.

ylab

Same as internal function 'plot'.

main

Same as internal function 'plot'.

x.legend

The x-coordinates to be used to position the legend.

y.legend

The y-coordinates to be used to position the legend.

cex.point

Defines the size of points in the plot.

cex.legend

Defines the size of the legend in the plot.

xat

The position of x-axis to be labeled.

xMark

The labels of x-axis corresponding to 'xat'.

yat

The position of y-axis to be labeled.

yMark

The labels of y-axis corresponding to 'yat'.

xLines

X-values indicating positions of vertical grey lines to be drawn.

yLines

Y-values indicating positions of horizontal grey lines to be drawn.

Author(s)

Xiaohua Douglas Zhang & Zhaozhi Zhang

References

Zhang XHD, Zhang ZZ. 2013. displayHTS: a R package displaying data and results from high-throughput screening experiments. Bioinformatics (submitted).

Zhang XHD, 2011. Optimal High-Throughput Screening: Practical Experimental Design and Data Analysis for Genome-scale RNAi Research. Cambridge University Press, Cambridge, UK.

Zhang XHD. 2009. A method effectively comparing gene effects in multiple conditions in RNAi and expression profiling research. Pharmacogenomics 10(3):345-358.

Zhang XHD. 2010. Assessing the size of gene or RNAi effects in multi-factor high-throughput experiments. Pharmacogenomics 11(2): 199 - 213.

Zhang XHD, Santini F, Lacson R, Marine SD, Wu Q, Benetti L, Yang R, McCampbell A, Berger JP, Toolan DM, Stec EM, Holder DJ, Soper KA, Heyse JF and Ferrer M. 2011. cSSMD: Assessing collective activity of multiple siRNAs in genome-scale RNAi screens. Bioinformatics 27(20): 2775-2781.

See Also

plateWellSeries.fn, imageDesign.fn, imageIntensity.fn

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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
  # for dual-flashlight plot
  data("HTSresults", package = "displayHTS")
  par( mfrow=c(1, 1) )
  dualFlashlight.fn(HTSresults, wellName="WELL_USAGE", x.name="mean",
                    y.name="ssmd", sampleName="Sample", sampleColor="black", 
                    controls = c("negCTRL", "posCTRL1", "mock1"),
                    controlColors = c("green", "red", "lightblue"), 
                    xlab="Average Fold Change", ylab="SSMD",
                    main="Dual-Flashlight Plot", x.legend=NA, y.legend=NA, 
                    cex.point=1, cex.legend = 0.8,
                    xat=log2( c(1/8, 1/4, 1/2, 1, 2, 4, 8) ), 
                    xMark=c("1/8", "1/4", "1/2", "1", "2", "4", "8"),
                    xLines=log2(c(1/4, 1/2 ,1, 2, 4)),
                    yLines=c(-5, -3, -2, -1, 0, 1, 2, 3, 5 ) )
  # for volcano plot
  result.df=cbind(HTSresults,"neg.log10.pval"=-log10(HTSresults[,"p.value"]))
  dualFlashlight.fn(result.df, wellName="WELL_USAGE", x.name="mean",
                    y.name="neg.log10.pval",
                    sampleName="Sample", sampleColor="black", 
                    controls = c("negCTRL", "posCTRL1", "mock1"),
                    controlColors = c("green", "red", "lightblue"), 
                    xlab="Average Fold Change", ylab="p-value",
                    main="Volcano Plot", x.legend=NA, y.legend=-log10(0.06), 
                    cex.point=1, cex.legend = 0.8,
                    xat=log2( c(1/8, 1/4, 1/2, 1, 2, 4, 8) ), 
                    xMark=c("1/8", "1/4", "1/2", "1", "2", "4", "8"),
                    yat=-log10( c(0.00001, 0.0001, 0.001, 0.01, 0.1, 1) ), 
                    yMark=c(0.00001, 0.0001, 0.001, 0.01, 0.1, 1),
                    xLines=log2(c(1/4, 1/2 ,1, 2, 4)),
                    yLines=-log10( c( 0.001, 0.01, 0.05) ) )
  # plate pair correlation plot
  data("HTSdataSort", package = "displayHTS")
  data.df= cbind(HTSdataSort[1:384,], HTSdataSort[384+1:384,])
  names(data.df)=
    c("SOBARCODE.1", "BARCODE.1", "XPOS.1", "YPOS.1", "WELL_USAGE.1",   
      "Compound.1", "Intensity.1", "log2Intensity.1",
      "SOBARCODE.2", "BARCODE.2", "XPOS.2", "YPOS.2", "WELL_USAGE.2",   
      "Compound.2", "Intensity.2", "log2Intensity.2")
  dualFlashlight.fn(data.df, wellName="WELL_USAGE.1", x.name="log2Intensity.1",
                    y.name="log2Intensity.2", 
                    sampleName="Sample", sampleColor="black", 
                    controls = c("negCTRL", "posCTRL1", "mock1"),
                    controlColors = c("green", "red", "lightblue"), 
                    xlab="log2 intensity in plate 1",
                    ylab="log2 intensity in plate 2",
                    main="Plate Pair Correlation Plot", x.legend=NA,
                    y.legend=NA, cex.point=1, cex.legend = 0.8 )
  abline(0,1)