getGeneVariability.MAData: Gets the genewise variability

Description Usage Arguments Author(s) See Also Examples

Description

Calculates the genewise variability. What spots belongs to which genes is defined by the layout of the slides, where all slides are assumed to have the same layout. See class Layout for more information about genes. For speed improvement, the gene variability will be cached for future queries. To override the cache, use force=TRUE.

Usage

1
2
## S3 method for class 'MAData'
getGeneVariability(this, robust=TRUE, force=FALSE, slides=NULL, ...)

Arguments

robust

If TRUE the median absolute deviation (MAD) of the residuals will be calculated, otherwise the sample standard deviation will be calculated.

force

If FALSE and if cached gene variability values exists they will be used, otherwise the gene variability will be (re-)calculated.

slides

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

Author(s)

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

See Also

To calculate the mean (or any other quantile) of the genewise variabilities see *getMOR(). 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
23
24
25
26
27
  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)
  ma.norm <- clone(ma)
  normalizeWithinSlide(ma.norm, method="s")
  normalizeAcrossSlides(ma.norm)
  var <- getGeneVariability(ma)
  var.norm <- getGeneVariability(ma.norm)
  var.diff <- var - var.norm

  # Statistics
  print(summary(var))
  print(summary(var.norm))
  print(summary(var.diff))
  cat("Number of 'improved' genes :", sum(var.diff > 0, na.rm=TRUE), "\n")
  cat("Number of 'worsened' genes :", sum(var.diff < 0, na.rm=TRUE), "\n")
  cat("Number of 'unchanged' genes:", sum(var.diff == 0, na.rm=TRUE), "\n")

  # Plots
  xlim <- quantile(c(var, var.norm), probs=c(0,0.999))
  subplots(4)
  hist(var, nclass=100, xlim=xlim, cex.main=0.7,
            main="Gene variability before normalization");
  hist(var.norm, nclass=100, xlim=xlim, cex.main=0.7,
                 main="Gene variability after normalization");
  hist(var.diff, nclass=50, cex.main=0.7, main="Improvements");

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