[BioC] Highlighting Multiple Types of Spots on Scatterplots (maPlot)

Stephen Benz sbenz at buckinstitute.org
Wed Jun 18 17:56:45 MEST 2003


Hi everyone~

	I figured I would share this with everyone as we had somewhat of
a difficult time figuring it out, and there didn't seem to be any
documentation to that effect.
	We have marrayRaw objects in which multiple types of controls
were defined, i.e.

Control spots: 
There are   5 types of controls : 
    Buffer      Empty       Fail          N Real Empty 
       418        174       1164       7268        384

	The data plotted fine, but I wanted a way to highlight more than
just one type of control.  The following commands seem to do exactly
that:

>highlight1.func <-
maText(subset=maControls(name.raw)=="Buffer",labels="*",col="blue")
>highlight2.func <-
maText(subset=maControls(name.raw)=="Empty",labels="x",col="red")
>highlight3.func <-
maText(subset=maControls(name.raw)=="Fail",labels="@",col="green")
>highlight4.func <- maText(subset=maControls(name.raw)=="Real
Empty",labels="^",col="purple")
>highlight.controls <- function(x,y) {
+highlight1.func(x,y)
+highlight2.func(x,y)
+highlight3.func(x,y)
+highlight4.func(x,y)
+}
>maPlot(name.raw,text.func=highlight.controls,lines.func=NULL,legend.fun
c=NULL)

Anyway, I hope this helps out someone along the way.

Steve Benz
Buck Institute for Research and Aging
sbenz at buckinstitute.org



More information about the Bioconductor mailing list