mzImage-package: What the package does (short line)

Description Details Author(s) References See Also Examples

Description

More about what it does (maybe more than one line) A concise (1-5 lines) description of the package

Details

Package: mzImage
Type: Package
Version: 1.0
Date: 2010-10-14
License: What license is it under?
LazyLoad: yes

An overview of how to use the package, including the most important functions

Author(s)

David Clifford Maintainer: Who to complain to <David.Clifford@csiro.au>

References

~~ Literature or other references for background information ~~

See Also

~~ Optional links to other man pages, e.g. ~~

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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
if(FALSE) {

  ## Do the following once

  ## Read in raw ims data stored in the subfolders of
  ##   040909_IPAplusminus0.1TFA_CHIP1000/040909_IPA_section_1_2 and
  ##   convert to mzxml and then to RData format in an output directory
  ##   called Data2
  ndir <- "040909_IPAplusminus0.1TFA_CHIP1000"
  tmp <- ReadSet(file.path(ndir,"040909_IPA_section_1_2"), "Data2")
  obj <- toMatrix(tmp)
  rm(tmp)

  ## Save data is R-friendly binary format
  save(obj,file="DataM2.RData")

  ## Start here in future:
  ## clear workspace and load data in matrix format
  rm(list=ls())
  load("DataM2.RData")

  ## Pre-processing - replace NAs by 0 and add 1, robust regression and log transform
  obj$data[is.na(obj$data)] <- 0
  obj$data <- obj$data + 1
  obj <- BGcorrect(obj)

  ## Compute TIC
  obj$TIC <- TIC(obj)

  ## plotTIC
  plotTIC(obj,log="")

  ## Display intensities at point of highest TIC value
  ss <- which.max(obj$TIC)
  library(colorspace)

  with(obj,display(data[,ss],X,Y))

  ## Compute SNR
  obj$SNR <- SNRobj(obj)

  ## plotSNR
  plotSNR(obj)

  ## Display intensities with highest SNR
  ss <- which.max(obj$SNR)
  with(obj,display(data[,ss],X,Y))

  ## Compute Noise
  obj$noise <- with(obj,apply(data, MARGIN = 2, FUN = computeNoise, x = X, y = Y))

  ## Display raw data, spatial smooth and noise at one mz value
  ss <- which.max(obj$SNR)
  par(mfrow=c(1,2))
  with(obj,display(data[,ss],X,Y))
  with(obj,display(noise[,ss],X,Y))

  ## Compute MNF transform - first 12 bands computed
  obj$MNF <- computeMNF(obj)

  ## plot first 4 bands of MNF
  plotMNF(obj,n=4)

}

david-clifford/mzImage documentation built on June 4, 2019, 11:29 p.m.