Entering edit mode
Stephen Benz
▴
10
@stephen-benz-349
Last seen 9.6 years ago
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.f
un
c=NULL)
Anyway, I hope this helps out someone along the way.
Steve Benz
Buck Institute for Research and Aging
sbenz@buckinstitute.org