peaksAlignment-class {flagme} | R Documentation |
Store the raw data and optionally, information regarding signal peaks for a number of GCMS runs
peaksAlignment(d1, d2, t1, t2, gap=0.5, D=50, timedf=NULL, df=30, verbose=TRUE, usePeaks=TRUE, compress=TRUE, metric=2, type=2, penality=0.2)
d1 |
matrix of MS intensities for 1st sample (if doing a peak alignment, this contains peak apexes/areas; if doing a profile alignment, this contains scan intensities. Rows are m/z bins, columns are peaks/scans. |
d2 |
matrix of MS intensities for 2nd sample |
t1 |
vector of retention times for 1st sample |
t2 |
vector of retention times for 2nd sample |
gap |
gap penalty for dynamic programming algorithm. Not used if |
D |
time window (on same scale as retention time differences,
|
timedf |
list (length = the number of pairwise alignments) of
matrices giving the expected time differences expected at each pair of
peaks used with |
df |
integer, how far from the diagonal to go to calculate the similarity of peaks. Smaller value should run faster, but be careful not to choose too low. |
verbose |
logical, whether to print out info. |
usePeaks |
logical, |
compress |
logical, whether to compress the similarity matrix into a sparse format. |
metric |
numeric, different algorithm to calculate the similarity
matrix between two mass spectrum. |
type |
numeric, two different type of alignment function |
penality |
penalization applied to the matching between two mass
spectra if |
peaksAlignment is a hold-all data structure of the raw and peak detection data.
peaksAlignment
object
Mark Robinson, Riccardo Romoli
Mark D Robinson (2008). Methods for the analysis of gas chromatography - mass spectrometry data PhD dissertation University of Melbourne.
peaksDataset
, clusterAlignment
## see clusterAlignment, it calls peaksAlignment ## Not Run: gcmsPath <- paste(find.package("gcspikelite"), "data", sep="/") cdfFiles <- dir(gcmsPath,"CDF", full=TRUE) # read data, peak detection results pd <- peaksDataset(cdfFiles[1:3], mz=seq(50,550), rtrange=c(7.5,10.5)) pd <- addXCMSPeaks(files=cdfFiles[1:3], object=pd, peakPicking=c('mF'), snthresh=3, fwhm=10, step=0.1, steps=2, mzdiff=0.5, sleep=0) ## review peak picking plot(pd, rtrange=c(7.5, 10.5), runs=c(1:3)) ## align two chromatogram pA <- peaksAlignment(pd@peaksdata[[1]], pd@peaksdata[[2]], pd@peaksrt[[1]], pd@peaksrt[[2]], D=50, metric=3, compress=FALSE, type=2, penality=0.2) plot(pA) pA@v$match par(mfrow=c(2,1)) plot(pd@peaksdata[[1]][,15], type='h', main=paste(pd@peaksrt[[1]][[15]])) plot(pd@peaksdata[[2]][,17], type='h', main=paste(pd@peaksrt[[2]][[17]])) ## End (Not Run)