normalizeAffineShift.MAData: Within-slide normalization that adjust the channel bias

Description Usage Arguments Value Author(s) See Also Examples

Description

Within-slide normalization that adjust the channel bias with the objective to minimize intensity dependency of the log-ratios.

Usage

1
2
## S3 method for class 'MAData'
normalizeAffineShift(this, slides=NULL, groupBy=NULL, weights=NULL, method=c("Kerr", "Newton", "Bengtsson"), interval=c("safe", "auto"), ...)

Arguments

slides

The slides which should be included in the calculations. If NULL, all slides are included.

groupBy

character string or LayoutGroups specifying the groups of spots that are to normalized individually. If NULL, all spots are normalized together.

method

character string specifying which method to use. If "Kerr", perpendicular translation normalization is applied. If "Newton", parallel translation normalization is applied. If "Bengtsson", semi-perpendicular translation normalization is applied.

interval

The interval of possible shifts. Either a numeric vector of length 2 or a character string. If "safe", the interval will be set, depending on method, such that no signals are made non-positive. If "auto", the interval is choosen automatically depending on method. For some methods, "auto" gives the same result as "safe".

...

Currently not used.

Value

Returns a list structure containing information about the fit etc.

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
14
15
16
17
18
19
20
21
22
SMA$loadData("mouse.data")
layout <- Layout$read("MouseArray.Layout.dat", path=system.file("data-ex", package="aroma"))
raw <- RawData(mouse.data, layout=layout)
methods <- c("Kerr", "Bengtsson")
Alim <- c(6,16)
Mlim <- c(-1,1)*3
subplots(2*length(methods))
for (method in methods) {
  ma <- getSignal(raw, bgSubtract=TRUE)
  fit <- normalizeAffineShift(ma, method=method, slide=1)
  a <- fit$shift[1,1]
  msg <- sprintf("Optimal shift according to '", method, "' is a = %1.f.\n", a)
  cat(msg)
  plot(ma, xlim=Alim, ylim=Mlim)
  lowessCurve(ma)
 
  x <- seq(-2*a,2*a, length=200)
  y <- sapply(x, FUN=fit$objectiveFunction, R=getR(ma),G=getG(ma))
  plot(x,y, pch=176, xlab="shift", ylab="objective");
  lines(x,y)
  abline(v=a)
} # for (method ...)

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