shift.MAData: Shift the log-ratios, log-intensities or the raw signal

Description Usage Arguments Value Author(s) See Also Examples

Description

Shift the log-ratios, log-intensities or the raw signal.

Usage

1
2
## S3 method for class 'MAData'
shift(this, M=NULL, A=NULL, R=NULL, G=NULL, slides=NULL, ...)

Arguments

M,A,R,G

A numeric or function specifying the shift to be applied to the log-ratios, the log-intensities, the red signals, and/or the green signals. If more than one of these are shifted at the same time, they are shifted in the order M, A, R and G. A numeric specify the amount of shift. If a function, e.g. min(), is used, then the amount of shift is the value returned by that function when all finite values are passed to that function, e.g. min(x[is.finite(x)]). In other words, NA's etc are automatically taken care of.

slides

Slides to be shifted. If NULL, all slides are shifted.

Value

Returns nothing.

Author(s)

Henrik Bengtsson (http://www.braju.com/R/)

See Also

For more information see MAData.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
  SMA$loadData("mouse.data")
  layout <- Layout$read("MouseArray.Layout.dat", path=system.file("data-ex", package="aroma"))
  raw <- RawData(mouse.data, layout=layout)
  ma <- getSignal(raw, bgSubtract=TRUE)

  subplots(4)
  xlim <- c(4,16); ylim <- c(-3,3);
  plot(ma, xlim=xlim, ylim=ylim)
  min1 <- function(x) { min(x)-1 }   # Shift to signal one (not zero!)
  shift(ma, R=min, G=min)
  plot(ma, xlim=xlim, ylim=ylim)
  shift(ma, M=median)
  plot(ma, xlim=xlim, ylim=ylim)

HenrikBengtsson/aroma documentation built on May 7, 2019, 12:56 a.m.