I tried setting the "Minimum detections #" in cell E19 to 1, but I am still having problems:
setwd("C:/Users/3125319/Desktop/EZ20140612/Positive")
library (rJava)
if (.Platform$OS.type == 'windows' & .Platform$r_arch == 'i386') {print('Loading XP 32bit startup')
.jinit ()}
library (mzmatch.R)
mzmatch.init (4000)
FILESf <- dir (full.names=TRUE,pattern="\\.peakml$")
mzmatch.ipeak.Combine(i=paste(FILESf,collapse=","),v=T,rtwindow=30,o="combined.peakml",combination="set",ppm=5, JHeapSize=4000)
mzmatch.ipeak.filter.NoiseFilter (i="combined.peakml",o="combined_noisef.peakml",v=T,codadw=0.8, JHeapSize=4000)
mzmatch.ipeak.filter.SimpleFilter(i="combined_noisef.peakml", o="combined_sfdet.peakml", mindetections=1, JHeapSize=4000)
mzmatch.ipeak.filter.SimpleFilter(i="combined_sfdet.peakml", o="combined_highintensity.peakml", minintensity=1000, JHeapSize=4000)
PeakML.GapFiller(filename = "combined_highintensity.peakml", ionisation = "detect", Rawpath = NULL, outputfile = "highintensity_gapfilled.peakml", ppm=5, rtwin = 0)
mzmatch.ipeak.sort.RelatedPeaks (i="highintensity_gapfilled.peakml",v=T,o="mzMatch_output.peakml",basepeaks="mzMatch_basepeaks.peakml",ppm=3,rtwindow=6, JHeapSize=4000)
annot <- paste("
relation.id,relation.ship,codadw,charge")
mzmatch.ipeak.convert.ConvertToText (i="mzMatch_output.peakml",o="mzMATCHoutput.txt",v=T,annotations=annot, JHeapSize=4000)
# Processing finished! Now extracting chromatogram images for each peak.
chromdir <- "chromatograms"
dir.create(chromdir)
PeakMLData <- PeakML.Read("mzMatch_output.peakml",Rawpath=NULL)
peakIDlist <- c(1:length(unique(PeakMLData$peakDataMtx[,10])))
sampnames <- PeakMLData$sampleNames
sampleslist<-c(1:max(PeakMLData$peakDataMtx[,9]))
groupsets <- max(PeakMLData$peakDataMtx[,11])
if (groupsets!=1) {samplegroups <- PeakMLData$phenoData} else {samplegroups <- sampnames}
classnumbers <- samplegroups
for (i in 1:length(unique(samplegroups))){classnumbers <- sub(unique(classnumbers)[i], i, classnumbers)}
for (a in 1:length(peakIDlist)){peakID <- peakIDlist[a]
hits <- which(PeakMLData$peakDataMtx[,10]==peakID)
intslist <- vector ("list")
rtlist <- vector ("list")
for (i in 1:length(hits)){intslist[[i]] <- PeakMLData$chromDataList[[hits[i]]][2,]
rtlist[[i]] <- (PeakMLData$chromDataList[[hits[i]]][3,]) / 60 }
maxint <- max(unlist(intslist))
minrt <- min (unlist(rtlist))
maxrt <- max (unlist(rtlist))
samplenumbers <- PeakMLData$peakDataMtx[hits,9]
myfilename <- paste(getwd(),"/",chromdir,"/",peakID,".png",sep="")
png(myfilename, width = 350, height = 300)
lw = 0.2
par(fig=c(0,1-lw,0,1))
plot (1,1,xlab="RT (m)", ylab="Intensity", pch="", xlim=c(minrt,maxrt), ylim=c(0,maxint))
for (i in 1:length(hits)){if (PeakMLData$peakDataMtx[hits[i],9] %in% sampleslist==TRUE){
points (rtlist[[i]], intslist[[i]], type="l", col=classnumbers[samplenumbers [i]])}}
par(fig=c(0,1,0,1))
lpos <- par("usr")[2]-(lw /(1-lw ))*(par("usr")[2]-par("usr")[1])
legend (lpos, par("usr")[4], text.col=unique(classnumbers[sampleslist]), unique(samplegroups[sampleslist]), cex=0.8,xpd=TRUE)
dev.off()}
> mzmatch.ipeak.filter.SimpleFilter(i="combined_noisef.peakml", o="combined_sfdet.peakml", mindetections=1, JHeapSize=4000)
> mzmatch.ipeak.filter.SimpleFilter(i="combined_sfdet.peakml", o="combined_highintensity.peakml", minintensity=1000, JHeapSize=4000)
> PeakML.GapFiller(filename = "combined_highintensity.peakml", ionisation = "detect", Rawpath = NULL, outputfile = "highintensity_gapfilled.peakml", ppm=5, rtwin = 0)
Raw data file located at: C:\Users\3125319\Desktop\EZ20140612\Positive\./QC_01.mzXML
Loading peakML file in memory (it can take some time, sorry)
Done in: 2 s
Extracting peak data from PeakMl file,
Peak data created in 3.29 s
Error in .jnew("peakml/util/rjava/Project", samplenames, rawdatafullpaths, : java.lang.NoSuchMethodError: <init>
> mzmatch.ipeak.sort.RelatedPeaks (i="highintensity_gapfilled.peakml",v=T,o="mzMatch_output.peakml",basepeaks="mzMatch_basepeaks.peakml",ppm=3,rtwindow=6, JHeapSize=4000)
------------------------------------------------------
| Copyright 2007-2009
| Groningen Bioinformatics Centre
| University of Groningen
|
| RelatedPeaks 1.0.0
|
| libraries:
| - jfreechart 1.0.13
| - itext 2.1.7
| - jama 1.0.2
| - lma 1.4.0
| - cmdline 2.0.0
| - domsax 1.1.0
| - peakml 1.0.0
| - mzmatch 1.0.2
------------------------------------------------------
Options {
minrt: -1.0
rtwindow: 6.0
v: true
basepeaks: mzMatch_basepeaks.peakml
h: false
i: highintensity_gapfilled.peakml
ppm: 3.0
o: mzMatch_output.peakml
}
loading data
java.io.FileNotFoundException: highintensity_gapfilled.peakml (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source) at mzmatch.ipeak.sort.RelatedPeaks.main(RelatedPeaks.java:257)
> annot <- paste("
relation.id,relation.ship,codadw,charge")
> mzmatch.ipeak.convert.ConvertToText (i="mzMatch_output.peakml",o="mzMATCHoutput.txt",v=T,annotations=annot, JHeapSize=4000)
------------------------------------------------------
| Copyright 2007-2009
| Groningen Bioinformatics Centre
| University of Groningen
|
| ConvertToText 1.0.1
|
| libraries:
| - jfreechart 1.0.13
| - itext 2.1.7
| - jama 1.0.2
| - lma 1.4.0
| - cmdline 2.0.0
| - domsax 1.1.0
| - peakml 1.0.0
| - mzmatch 1.0.2
------------------------------------------------------
Options {
databases: []
v: true
h: false
i: [mzMatch_output.peakml]
annotations: [
relation.id, relation.ship, codadw, charge]
o: mzMATCHoutput.txt
}
[ERROR]: the input-file 'mzMatch_output.peakml' does not exist.
>
> # Processing finished! Now extracting chromatogram images for each peak.
> chromdir <- "chromatograms"
> dir.create(chromdir)
> PeakMLData <- PeakML.Read("mzMatch_output.peakml",Rawpath=NULL)
Error: XML content does not seem to be XML: 'mzMatch_output.peakml'
Timing stopped at: 0 0.01 0.02
> peakIDlist <- c(1:length(unique(PeakMLData$peakDataMtx[,10])))
Error in unique(PeakMLData$peakDataMtx[, 10]) :
error in evaluating the argument 'x' in selecting a method for function 'unique': Error: object 'PeakMLData' not found
> sampnames <- PeakMLData$sampleNames
Error: object 'PeakMLData' not found
> sampleslist<-c(1:max(PeakMLData$peakDataMtx[,9]))
Error: object 'PeakMLData' not found
> groupsets <- max(PeakMLData$peakDataMtx[,11])
Error: object 'PeakMLData' not found
> if (groupsets!=1) {samplegroups <- PeakMLData$phenoData} else {samplegroups <- sampnames}
Error: object 'groupsets' not found
> classnumbers <- samplegroups
Error: object 'samplegroups' not found
> for (i in 1:length(unique(samplegroups))){classnumbers <- sub(unique(classnumbers)[i], i, classnumbers)}
Error in unique(samplegroups) :
error in evaluating the argument 'x' in selecting a method for function 'unique': Error: object 'samplegroups' not found
> for (a in 1:length(peakIDlist)){peakID <- peakIDlist[a]
+ hits <- which(PeakMLData$peakDataMtx[,10]==peakID)
+ intslist <- vector ("list")
+ rtlist <- vector ("list")
+ for (i in 1:length(hits)){intslist[[i]] <- PeakMLData$chromDataList[[hits[i]]][2,]
+ rtlist[[i]] <- (PeakMLData$chromDataList[[hits[i]]][3,]) / 60 }
+ maxint <- max(unlist(intslist))
+ minrt <- min (unlist(rtlist))
+ maxrt <- max (unlist(rtlist))
+ samplenumbers <- PeakMLData$peakDataMtx[hits,9]
+ myfilename <- paste(getwd(),"/",chromdir,"/",peakID,".png",sep="")
+ png(myfilename, width = 350, height = 300)
+ lw = 0.2
+ par(fig=c(0,1-lw,0,1))
+ plot (1,1,xlab="RT (m)", ylab="Intensity", pch="", xlim=c(minrt,maxrt), ylim=c(0,maxint))
+ for (i in 1:length(hits)){if (PeakMLData$peakDataMtx[hits[i],9] %in% sampleslist==TRUE){
+ points (rtlist[[i]], intslist[[i]], type="l", col=classnumbers[samplenumbers [i]])}}
+ par(fig=c(0,1,0,1))
+ lpos <- par("usr")[2]-(lw /(1-lw ))*(par("usr")[2]-par("usr")[1])
+ legend (lpos, par("usr")[4], text.col=unique(classnumbers[sampleslist]), unique(samplegroups[sampleslist]), cex=0.8,xpd=TRUE)
+ dev.off()}
Error: object 'peakIDlist' not found
>
On Tuesday, 17 June 2014 16:07:12 UTC+2, Lucas Schwartzenberg wrote: