More Problems running "MZmatch to combine data and annotate related peaks"

127 views
Skip to first unread message

Lucas Schwartzenberg

unread,
Jun 17, 2014, 10:07:12 AM6/17/14
to id...@googlegroups.com
Hello again, I am trying to get IDEOM to create an MZmatchoutput.txt for a single .raw file (only for the positive mode), so I can quickly test my Authentic standards.
However, the Rgui fails to output the .txt file (Rgui output below).
This time I took care not to more things around too much, but it doesn't seem to be the problem here. I checked and the 'positive' file does contain the QC_01.xml and QC_01.peakml files, although I'm not sure their content has been successfully generated. I tried restarting from scratch, but the same problem pops up.



> mzmatch.init (4000)
C:/Program_Files/R/R-3.1.0/library/mzmatch.R/java/mzmatch.jar
>
> 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)
 ------------------------------------------------------
| Copyright 2007-2009
| Groningen Bioinformatics Centre
| University of Groningen
|
| Combine 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 {
  rtwindow:    30.0
  v:           true
  h:           false
  i:           [./QC_01.peakml]
  label:       null
  ppm:         5.0
  o:           combined.peakml
  labels:      []
  combination: set
}
Loading:
- ./QC_01.peakml
Matching data
Writing the results
> mzmatch.ipeak.filter.NoiseFilter (i="combined.peakml",o="combined_noisef.peakml",v=T,codadw=0.8, JHeapSize=4000)
 ------------------------------------------------------
| Copyright 2007-2009
| Groningen Bioinformatics Centre
| University of Groningen
|
| NoiseFilter 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 {
  rejected: null
  codadw:   0.8
  v:        true
  h:        false
  i:        [combined.peakml]
  o:        combined_noisef.peakml
}
Loading 'combined.peakml'.
Calculating the signal-scores
Writing valid
> mzmatch.ipeak.filter.SimpleFilter(i="combined_noisef.peakml", o="combined_sfdet.peakml", mindetections=3, JHeapSize=4000)
> mzmatch.ipeak.filter.SimpleFilter(i="combined_sfdet.peakml", o="combined_highintensity.peakml", minintensity=1000, JHeapSize=4000)
java.lang.RuntimeException: A peakset needs at least 1 peak to function correctly
        at peakml.IPeakSet.init(IPeakSet.java:101)
        at peakml.IPeakSet.<init>(IPeakSet.java:95)
        at peakml.io.peakml.PeakMLParser.parse(PeakMLParser.java:176)
        at peakml.io.peakml.PeakMLParser.parse(PeakMLParser.java:108)
        at mzmatch.ipeak.filter.SimpleFilter.main(SimpleFilter.java:306)
> PeakML.GapFiller(filename = "combined_highintensity.peakml", ionisation = "detect", Rawpath = NULL, outputfile = "highintensity_gapfilled.peakml", ppm=5, rtwin = 0)
Document is empty

Lucas Schwartzenberg

unread,
Jun 17, 2014, 10:35:42 AM6/17/14
to id...@googlegroups.com
PS: it has been brought to my attention that the .raw is unusual in that it contains 2 negative modes in order to exclude a problematic interference peak. Might this be causing problems?

Andris Jankevics

unread,
Jun 17, 2014, 11:21:15 AM6/17/14
to Lucas Schwartzenberg, Ideom
Hi Lucas,

You are using SimpleFilter to remove all peak sets which are detetected in less than 3 samples. As fas as I can see, you are processing only single measurement - QC_01.peakml. So simpleFilter results in empty file which can't be processed by GapFiller.

Help page for SimpleFilter:

Best Regards,
Andris

Andris Jankevics

Research associate
Faculty of Life Sciences, Manchester Institute of Biotechnology, 
University of Manchester,
Manchester, United Kingdom


--
You received this message because you are subscribed to the Google Groups "Ideom" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ideom+un...@googlegroups.com.
To post to this group, send email to id...@googlegroups.com.
Visit this group at http://groups.google.com/group/ideom.
For more options, visit https://groups.google.com/d/optout.

Darren Creek

unread,
Jun 17, 2014, 8:19:47 PM6/17/14
to Andris Jankevics, Lucas Schwartzenberg, Ideom
Thanks Andris for explaining the problem.
Lucas,
 If you are running mzMatch.r through IDEOM you can change this threshold to 1 in the "Minimum detections #" setting. Cell E19 on the settings page. 

cheers,
Darren
--
Dr Darren Creek
 
NHMRC CJ Martin Fellow / Lecturer
Drug Delivery, Disposition and Dynamics
Monash Institute of Pharmaceutical Sciences
Monash University, Parkville campus
381 Royal Parade, Parkville, Vic, 3052
 
Join us for the
International Metabolomics Society Conference, Tsuruoka / Japan, June 23 - 26, 2014


Lucas Schwartzenberg

unread,
Jun 19, 2014, 7:52:43 AM6/19/14
to id...@googlegroups.com
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:
Reply all
Reply to author
Forward
0 new messages