Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in fillpeaks after XCMSnExp conversion #54

Open
ghost opened this issue Apr 11, 2020 · 3 comments
Open

Error in fillpeaks after XCMSnExp conversion #54

ghost opened this issue Apr 11, 2020 · 3 comments

Comments

@ghost
Copy link

ghost commented Apr 11, 2020

Hello,
I would like to annotate my masses
I have xcms version 3.9.2 and camera version 1.43.2.
I do the different stages of processing xcms
and I converted my XCMSnExp to xcmsSet
when I apply the Fillpeaks function, here is the error message:
Error in rowSums(groupmat[, (match( npeaks, colnames(groupmat)) + 1):ncol(groupmat), :
'x' must be numeric
I take exactly the same steps as the MTBLS2 example

Thanks

Yohann

@stanstrup
Copy link
Contributor

stanstrup commented Apr 11, 2020

Would be helpful to post your whole script starting from conversion of the object.

@ghost
Copy link
Author

ghost commented Apr 11, 2020

I precise i have the same error with the MTBLS2 example

@ghost
Copy link
Author

ghost commented Apr 11, 2020

waters (.raw) files that I converted via pw (MS1/MSe)
exemple with 8 files

mzmlpath <- "D:/Tau_Ltm/"
mzmlfiles <- list.files(mzmlpath , recursive = TRUE, full.names = TRUE)
list.files(cdfpath, recursive = TRUE)
files = cdffiles

pd<-data.frame(sample_name = sub(basename(files),pattern = ".mzML", replacement = "", fixed = TRUE), stringsAsFactors = FALSE)
raw_data<-readMSData(files, pdata = new("NAnnotatedDataFrame", pd), mode = "onDisk")

mslevel

table(msLevel(raw_data))

MS1

cwp <- CentWaveParam(ppm=25, peakwidth=c(2,25), mzdiff=0.01, snthresh=10 , prefilter=c(3,100),noise = 0)
xdata <- findChromPeaks(raw_data, param = cwp)

MS2

xdata <- findChromPeaks(xdata, param = cwp1, msLevel = 2L, add = TRUE)

grouping

pdp <- PeakDensityParam(sampleGroups = rep(1, length(fileNames(xdata))),minFraction = 0.8)
xdata <- groupChromPeaks(xdata, param = pdp)

###retention time correction
xdata <- adjustRtime(xdata, param = ObiwarpParam(binSize = 0.6))

grouping

xdata <- groupChromPeaks(xdata, param = pdp )
xdata <- groupChromPeaks(xdata, param = pdp , msLevel = 2L, add = TRUE)

fillpeaks

processed_Data <- fillChromPeaks( xdata, param = FillChromPeaksParam(fixedRt = medWidth))
processed_Data <- fillChromPeaks(xdata, param = FillChromPeaksParam(fixedRt = medWidth), msLevel = 2L)

annotation via camera

xset <- as(filterMsLevel(processed_Data, msLevel = 1L), "xcmsSet")
sampclass(xset) <- rep(1, length(fileNames(xdata)))
gdata <- fillPeaks(xset )

and then the error message
Error in rowSums(groupmat[, (match("npeaks", colnames(groupmat)) + 1):ncol(groupmat), :
'x' doit être numérique

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant