Error: could not find function "xcmsSet"

80 views
Skip to first unread message

Lucas Schwartzenberg

unread,
Nov 11, 2014, 8:43:26 AM11/11/14
to id...@googlegroups.com

When I try to use "c) Run XCMS to pick peaks and convert to peakML files"

I keep getting this error:
Error: could not find function "xcmsSet"
I can get around the error by
library (xcms)
And then manually reentering the commands from the file, but this is not long term solution for me.
Is there some way for the xcms-library to be loaded automatically?







(rJava)
> if (.Platform$OS.type == 'windows' & .Platform$r_arch == 'i386') {print('Loading XP 32bit startup')
+ .jinit ()}
> library (mzmatch.R)
Loading required package: Rcpp
> mzmatch.init (16000)
C:/Program_Files/R/R-3.1.2/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="positive",addscans=2,writeRejected=FALSE,ApodisationFilter=TRUE)}
Error: could not find function "xcmsSet"
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages