multipleAlignment-class: Data Structure for multiple alignment of many GCMS samples

multipleAlignment-classR Documentation

Data Structure for multiple alignment of many GCMS samples

Description

Store the raw data and optionally, information regarding signal peaks for a number of GCMS runs

Usage

multipleAlignment(
  pd,
  group,
  bw.gap = 0.8,
  wn.gap = 0.6,
  bw.D = 0.2,
  wn.D = 0.05,
  filterMin = 1,
  lite = FALSE,
  usePeaks = TRUE,
  df = 50,
  verbose = TRUE,
  timeAdjust = FALSE,
  doImpute = FALSE,
  metric = 2,
  type = 2,
  penality = 0.2,
  compress = FALSE
)

Arguments

pd

a peaksDataset object

group

factor variable of experiment groups, used to guide the alignment algorithm

bw.gap

gap parameter for "between" alignments

wn.gap

gap parameter for "within" alignments

bw.D

distance penalty for "between" alignments. When type = 2 represent the retention time window expressed in seconds

wn.D

distance penalty for "within" alignments. When type = 2 represent the retention time window expressed in seconds

filterMin

minimum number of peaks within a merged peak to be kept in the analysis

lite

logical, whether to keep "between" alignment details (default, FALSE)

usePeaks

logical, whether to use peaks (if TRUE) or the full 2D profile alignment (if FALSE)

df

distance from diagonal to calculate similarity

verbose

logical, whether to print information

timeAdjust

logical, whether to use the full 2D profile data to estimate retention time drifts (Note: time required)

doImpute

logical, whether to impute the location of unmatched peaks

metric

numeric, different algorithm to calculate the similarity matrix between two mass spectrum. metric=1 call normDotProduct(); metric=2 call ndpRT(); metric=3 call corPrt()

type

numeric, two different type of alignment function

penality

penalization applied to the matching between two mass spectra if (t1-t2)>D

compress

logical whether to compress the similarity matrix into a sparse format.

Details

multipleAlignment is the data structure giving the result of an alignment across several GCMS runs. Multiple alignments are done progressively. First, all samples with the same tg$Group label with be aligned (denoted a "within" alignment). Second, each group will be summarized into a pseudo-data set, essentially a spectrum and retention time for each matched peak of the within-alignment. Third, these "merged peaks" are aligned in the same progressive manner, here called a "between" alignment.

Value

multipleAlignment object

Author(s)

Mark Robinson

References

Mark D Robinson (2008). Methods for the analysis of gas chromatography - mass spectrometry data PhD dissertation University of Melbourne.

See Also

peaksDataset, betweenAlignment, progressiveAlignment

Examples

	require(gcspikelite)

## paths and files
gcmsPath <- paste(find.package("gcspikelite"), "data", sep = "/")
cdfFiles <- dir(gcmsPath, "CDF", full = TRUE)
eluFiles <- dir(gcmsPath, "ELU", full = TRUE)

## read data, peak detection results
pd <- peaksDataset(cdfFiles[1:2], mz = seq(50, 550), rtrange = c(7.5, 8.5))
pd <- addAMDISPeaks(pd,eluFiles[1:2])

## multiple alignment
ma <- multipleAlignment(pd, c(1, 1), wn.gap = 0.5, wn.D = 0.05, bw.gap = 0.6,
	                      bw.D = 0.2, usePeaks = TRUE, filterMin = 1, df = 50,
	                      verbose = TRUE, metric = 1, type = 1)

rromoli/flagme documentation built on Feb. 10, 2023, 12:59 a.m.