# # # R代码从装饰图案的flagme来源。Rnw“# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #代码块1号:图书馆# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #要求(gcspikelite)库(flagme) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #代码块2号:rawdata # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # gcmsPath < -粘贴(find.package (“gcspikelite”),“数据”,9 = " / ")的数据(目标)cdfFiles < -粘贴(gcmsPath,目标文件名,9 = " / ")eluFiles < - gsub(“提供”、“ELU”, cdfFiles) pd < - peaksDataset (cdfFiles mz = seq (50550), rtrange = c (7.5, 8.5)) pd <——addAMDISPeaks (pd, eluFiles) pd # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #代码块3号:addXCMS # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # pd。2 < - peaksDataset (cdfFiles [1:3], mz = seq (550), rtrange = c (7.5, 8.5)) cwt < - xcms:: CentWaveParam (snthresh = 3, ppm = 3000, peakwidth = c(40),预滤器= c (100), fitgauss = FALSE,整合= 2,噪音= 0,extendLengthMSW = TRUE, mzCenterFun =“wMean”) mfp < - xcms:: MatchedFilterParam(应用= 10,snthresh = 5) pd。2 < - addXCMSPeaks (cdfFiles [1:3], pd。2、设置= mfp minintens = 100, multipleMatchedFilter = FALSE, multipleMatchedFilterParam =列表(应用= c (5、10、20), rt_abs = 2, mz_abs = 0.1)) pd。2 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #代码块数量4:plotexample1 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # plotChrom (pd, rtrange = c (7.5, 8.5), plotPeaks = TRUE, plotPeakLabels = TRUE,马克斯。how.near = 0.5 = 8附近坳=代表(c(“蓝”、“红”、“黑色”),每个= 3))# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #代码块5号:plotexample2 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # r < - 1 plotImage (pd、运行= r rtrange = c(7.5, 8.5),主要= " ")v <——(pd@peaksdata [[r]] > 0, arr.ind = TRUE) #发现发现山峰abline (v = pd@peaksrt [[r]])点(pd@peaksrt [[r]] [v [2]], pd@mz [v [1]], pch = 19日cex =。6,坳=“白色”)# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #代码块6号:pairwisealignexample # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Ds < - c(0.1, 0.1, 0.1)空白< - c(0.5, 0.5, 0.1, 0.9)标准(mfrow = c(2, 2),麦= c(0.8466, 0.4806, 0.4806, 0.1486),(我在1:4){pa <——peaksAlignment (pd@peaksdata [[1]], pd@peaksdata [[2]], pd@peaksrt [[1]], pd@peaksrt [[2]], D = Ds[我],[我]=差距,差距指标= 1,类型= 1,压缩= FALSE) plotAlignment (pa, xlim = c (0, 17), ylim = c (0, 16), matchCol =“黄色”,主要=粘贴(D =, Ds[我]," = "的差距,差距[我],9 = " "))}# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #代码块7号:multiplealignment # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #打印(目标)马< - multiplealignment (pd组=美元目标组,wn.gap = 0.5, wn.D =。05年,bw.gap =。6 bw.D = 0.05 usePeaks = TRUE, filterMin = 1, df = 50, verbose = FALSE,度量= 1,类型= 1)# bug马# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #代码块8号:multiplealignmentfig # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # plotChrom (pd, rtrange = c(7.5, 8.5),运行= ma@betweenAlignment@runs介意= ma@betweenAlignment@ind plotPeaks = TRUE, plotPeakLabels = TRUE,马克斯。how.near = = 8附近。5、坳=代表(c(“蓝”、“红”“黑”),每个= 3))# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #代码块9号:correlationAlignment (eval = FALSE) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #议员< = pd - correlationAlignment(对象。2用力推= 0.85 D = 20, penality = 0.2, # # = TRUE正常化,minFilter = 1) # #议员# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #代码块10号:multiplealignmentres # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ma@betweenAlignment@runs ma@betweenAlignment@ind # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #代码块11号:alignmentres # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # outList < - gatherInfo (pd, ma) outList [[8]] rtmat < -矩阵(unlist(拉普兰人(outList .subset, rt), use.names = FALSE), nr =长度(outList) byrow = TRUE) colnames (rtmat) <——名字(outList[[1]]美元rt);rownames (rtmat) < - 1: nrow (rtmat)轮(rtmat, 3) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #代码块12号:会话# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # sessionInfo日期()()