Skip to main content
Topic: Odd group() / minfrac behavior. (Read 3689 times) previous topic - next topic

Odd group() / minfrac behavior.

Hello folks,
I found a (for me inexplicable) phenomenon when working with the group.density function of XCMS.
I played a little with the minfrac and minsamp arguments and set both to 0, having in mind that this should be some kind of unbiased grouping (i.e. getting for example features that  occur only in one replicate).
I obtained 1022 features using the faahko data set.
Code: [Select]
library(faahKO)
Frac0Samp0<-group(faahko, minfrac = 0, minsamp = 0)
nrow(Frac0Samp0@groups)
## 1022
The same procedure for the default group() settings (minfrac = 0.5, minsamp = 1)
Code: [Select]
Frac50Samp1<-group(faahko, minfrac = 0.5, minsamp = 1)
nrow(Frac50Samp1@groups)
## 407
So far so good, but when I compared the mzmed values of the two datasets with setdiff(), I found one value that did not appear in the "unbiased" xmcsSet object Frac0Samp0.
Code: [Select]
setdiff(Frac50Samp1@groups[,"mzmed"], Frac0Samp0@groups[,"mzmed"])
## 592.4473
As soon as I set minfrac to 0.5 and leaving minsamp = 0 the missing value/feature is appearing again.
Has someone an idea why this is happening or how I could do a real unbiased grouping?
Kind regards,
Tim