Skip to main content
Topic: Error in do_adjustRtime_peakGroups(peaks = peakmat, peakIndex = object@groupidx, (Read 3437 times) previous topic - next topic

Error in do_adjustRtime_peakGroups(peaks = peakmat, peakIndex = object@groupidx,

Hey,
Anybody knows how to solve this problem with XC-MS? It shows:
> xset2 <- retcor(xset1, family= "s", plottype= "m", missing=1, extra=1,
+ span=1)
Performing retention time correction using 2 peak groups.
Error in do_adjustRtime_peakGroups(peaks = peakmat, peakIndex = object@groupidx,  :
  Not enough peak groups even for linear smoothing available!
In addition: Warning message:
In do_adjustRtime_peakGroups(peaks = peakmat, peakIndex = object@groupidx,  :
  Too few peak groups for 'loess', reverting to linear method


Many thanks!

Yuechen

Re: Error in do_adjustRtime_peakGroups(peaks = peakmat, peakIndex = object@groupidx,

Reply #1
Dear Yuechen,

the *peak density* alignment method requires a certain number of features (AKA grouped peaks) across all samples to perform the alignment. Without knowing more about your data it is pretty hard to tell what the problem is. I'd suggest you redo the correspondence analysis (peak grouping) with less stringent settings and retry.

Secondly: I would suggest that you switch over to the *new* user interface and functions (see https://bioconductor.org/packages/release/bioc/vignettes/xcms/inst/doc/xcms.html for details). There you will e.g. also have the possibility to do the alignment on a subset of samples (e.g. if you have QC samples) or to exclude blank samples from the alignment (these in fact could cause the problem described above).

jo

Re: Error in do_adjustRtime_peakGroups(peaks = peakmat, peakIndex = object@groupidx,

Reply #2
Dear Jo,

Since it is my first time to use this forum, I was so excited when I notice your reply my message. Thank you so much for helping me solve the peoblem.

I will try to do it with your suggestions.

Many thanks

Yuechen

 

Re: Error in do_adjustRtime_peakGroups(peaks = peakmat, peakIndex = object@groupidx,

Reply #3
Dear Yuechen,

the *peak density* alignment method requires a certain number of features (AKA grouped peaks) across all samples to perform the alignment. Without knowing more about your data it is pretty hard to tell what the problem is. I'd suggest you redo the correspondence analysis (peak grouping) with less stringent settings and retry.

Secondly: I would suggest that you switch over to the *new* user interface and functions (see https://bioconductor.org/packages/release/bioc/vignettes/xcms/inst/doc/xcms.html for details). There you will e.g. also have the possibility to do the alignment on a subset of samples (e.g. if you have QC samples) or to exclude blank samples from the alignment (these in fact could cause the problem described above).

jo

Hi Johannes,
I suffered the same problems in peak alignment that complained too few peak groups, it  happened when my samples number more than 3000, but it worked fine for less than 3000 samples. there are two groups for all my data (pos and neg). I used internal standards to do normalization, and I do not have QC samples in my dataset. I need to process more than 5000 or even more samples in my study, now I am struggling with it, do you have any better solution for it?
scripts I used
pdp <- PeakDensityParam(sampleGroups=xset_peaksIdentified@phenoData@data$sample_group,
                        maxFeatures  = 100,
                        bw           = 10,
                        minFraction  = 0.1,
                        minSamples   =1)

xset_grouped_first <- groupChromPeaks(xset_peaksIdentified, param=pdp)


# Run
pgp <- PeakGroupsParam(smooth = "loess",
                                    span = 0.7,
                                    minFraction   = 0.1,
                                    family = "gaussian",
                                    extraPeaks = 1)
xset_aligned <- adjustRtime(xset_grouped_first, param=pgp)
group again.......


Best
Tingting