Error: Object Not Found

61 views
Skip to first unread message

Russell Swift

unread,
Mar 17, 2015, 3:54:54 PM3/17/15
to id...@googlegroups.com
Hello, 

I have been attempting use IDEOM and have come across multiple warnings and errors when I try to process my data. My data is properly indexed in separate folders, and I am using the most recent 64-bit Java, and have increased the virtual memory on machine because I was previously running into an issue with memory. However, I keep running into various warnings and errors when I try to run the combined steps c.) and d.) for XCMS and mzMatch processing. And advice on how I can troubleshoot this would be much appreciated. 

The first warning message I receive is as follows: 

Warning messages:
1: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
2: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'

Up until this point there are no warnings and everything looks fine. The next concerning thing I see in the code states that there is an empty document, or that something is not found: 

reading the input
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 = "negative", Rawpath = NULL, outputfile = "highintensity_gapfilled.peakml", ppm = 0, rtwin = 0)
Document is empty
Start tag expected, '<' not found
Error: 1: Document is empty
2: Start tag expected, '<' not found
Timing stopped at: 0 0 0.22 
Timing stopped at: 0.08 0 0.3 

And then later see that a file cannot be found: 

java.io.FileNotFoundException: highintensity_gapfilled.peakml (The system cannot find the file specified)

I then see a large number of errors in quick succession: 

[ERROR]: the input-file 'mzMatch_output.peakml' does not exist.
...
Error: XML content does not seem to be XML: 'mzMatch_output.peakml'
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
...
Error: object 'peakIDlist' not found



Again, any help would be appreciated. Thanks in advance.

Best,

Russell

Andris Jankevics

unread,
Mar 17, 2015, 3:59:02 PM3/17/15
to Russell Swift, Ideom
Hi Russel,

We will need to see a whole command line output to be able to assist you. As apearnatly something is going wrong before the commands you posted in your e-mail.

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.

Russell Swift

unread,
Mar 17, 2015, 4:19:26 PM3/17/15
to id...@googlegroups.com
I have been asked to post the entire code, which is pasted below: 


> setwd("C:/Users/User/Documents/Russell/Mass_spec/18f15/Negative/c12/24")
> library (rJava)
> if (.Platform$OS.type == 'windows' & .Platform$r_arch == 'i386') {print('Loading XP 32bit startup')
+ .jinit ()}
> library (mzmatch.R)
Loading required package: Rcpp
Loading required package: xcms
Loading required package: mzR
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: ‘BiocGenerics’

The following objects are masked from ‘package:parallel’:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from ‘package:rJava’:

    anyDuplicated, duplicated, sort, unique

The following object is masked from ‘package:stats’:

    xtabs

The following objects are masked from ‘package:base’:

    anyDuplicated, append, as.data.frame, as.vector, cbind, colnames,
    do.call, duplicated, eval, evalq, Filter, Find, get, intersect,
    is.unsorted, lapply, Map, mapply, match, mget, order, paste, pmax,
    pmax.int, pmin, pmin.int, Position, rank, rbind, Reduce, rep.int,
    rownames, sapply, setdiff, sort, table, tapply, union, unique,
    unlist, unsplit

Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.


Attaching package: ‘xcms’

The following objects are masked from ‘package:Biobase’:

    phenoData, phenoData<-

Warning message:
In fun(libname, pkgname) :
  mzR has been built against a different Rcpp version (0.11.3)
than is installed on your system (0.11.5). This might lead to errors
when loading mzR. If you encounter such issues, please send a report,
including the output of sessionInfo() to the Bioc mailing list at 
> mzmatch.init (16000)
C:/Software/R/library/mzmatch.R/java/mzmatch.jar 
> rawfiles <- dir (full.names=TRUE,pattern="\\.mzXML*",recursive=TRUE)
> outputfiles <- paste(sub(".mzXML*","",rawfiles),".peakml",sep="")
> for (i in 1:length(rawfiles)){xset <- xcmsSet(rawfiles[i], method='centWave', ppm=2, peakwidth=c(5,100), snthresh=3, prefilter=c(3,1000), integrate=1, mzdiff=0.001, verbose.columns=TRUE, fitgauss=FALSE, nSlaves=1)
+ PeakML.xcms.write.SingleMeasurement (xset=xset,filename=outputfiles[i],ionisation="negative",addscans=2,writeRejected=FALSE,ApodisationFilter=TRUE)}

 Detecting mass traces at 2 ppm ... 
 % finished: 0 10 20 30 40 50 60 70 80 90 100 
 5508 m/z ROI's.

 Detecting chromatographic peaks ... 
 % finished: 0 10 20 30 40 50 60 70 80 90 100 
 710  Peaks.
negative 
retrieving raw data
- C:/Users/User/Documents/Russell/Mass_spec/18f15/Negative/c12/24/./C12/Neg_C12_24.mzXML 
666  peaks exported.
Use version 1:  TRUE 

 Detecting mass traces at 2 ppm ... 
 % finished: 0 10 20 30 40 50 60 70 80 90 100 
 5406 m/z ROI's.

 Detecting chromatographic peaks ... 
 % finished: 0 10 20 30 40 50 60 70 80 90 100 
 718  Peaks.
negative 
retrieving raw data
- C:/Users/User/Documents/Russell/Mass_spec/18f15/Negative/c12/24/./C13/Neg_C13_24.mzXML 
673  peaks exported.
Use version 1:  TRUE 
Warning messages:
1: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
2: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
> 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=16000)
 ------------------------------------------------------
| 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:           [-o, combined.peakml]
  label:       null
  ppm:         5.0
  o:           null
  labels:      []
  combination: set
}
Loading:
- -o
java.io.FileNotFoundException: -o (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.Combine.main(Combine.java:338)
> mzmatch.ipeak.filter.NoiseFilter (i="combined.peakml",o="combined_noisef.peakml",v=T,codadw=0.8, JHeapSize=16000)
 ------------------------------------------------------
| 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
}
[ERROR]: the input-file 'combined.peakml' does not exist.
> mzmatch.ipeak.filter.SimpleFilter(i="combined_noisef.peakml", o="combined_sfdet.peakml", mindetections=1, v=T, JHeapSize=16000)
 ------------------------------------------------------
| Copyright 2007-2009
| Groningen Bioinformatics Centre
| University of Groningen
|
| SimpleFilter 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 {
  minscanid:        -1.0
  databases:        []
  maxscanid:        -1.0
  maxmass:          -1.0
  minintensity:     -1.0
  offset:           0
  minretentiontime: -1.0
  rejected:         null
  h:                false
  i:                [combined_noisef.peakml]
  annotations:      []
  ppm:              0.0
  maxretentiontime: -1.0
  n:                -1
  o:                combined_sfdet.peakml
  minmass:          -1.0
  maxintensity:     -1.0
  v:                true
  mindetections:    1
}
[ERROR]: the input-file 'combined_noisef.peakml' does not exist.
> mzmatch.ipeak.filter.SimpleFilter(i="combined_sfdet.peakml", o="combined_highintensity.peakml", minintensity=100000, v=T, JHeapSize=16000)
 ------------------------------------------------------
| Copyright 2007-2009
| Groningen Bioinformatics Centre
| University of Groningen
|
| SimpleFilter 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 {
  minscanid:        -1.0
  databases:        []
  maxscanid:        -1.0
  maxmass:          -1.0
  minintensity:     100000.0
  offset:           0
  minretentiontime: -1.0
  rejected:         null
  h:                false
  i:                [combined_sfdet.peakml]
  annotations:      []
  ppm:              0.0
  maxretentiontime: -1.0
  n:                -1
  o:                combined_highintensity.peakml
  minmass:          -1.0
  maxintensity:     -1.0
  v:                true
  mindetections:    -1
}
[ERROR]: the input-file 'combined_sfdet.peakml' does not exist.
> PeakML.GapFiller(filename = "combined_highintensity.peakml", ionisation = "negative", Rawpath = NULL, outputfile = "highintensity_gapfilled.peakml", ppm = 0, rtwin = 0)
Error: XML content does not seem to be XML: 'combined_highintensity.peakml'
Timing stopped at: 0 0 0 
Timing stopped at: 0.08 0 0.08 
> mzmatch.ipeak.sort.RelatedPeaks (i="highintensity_gapfilled.peakml",v=T,o="mzMatch_output.peakml",basepeaks="mzMatch_basepeaks.peakml",ppm=3,rtwindow=6, JHeapSize=16000)
 ------------------------------------------------------
| 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=16000)
 ------------------------------------------------------
| 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 0 
> 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()}
Reply all
Reply to author
Forward
0 new messages