R/group_feature_methods.R
groupFeatures-abundance-correlation.Rd
This method groups features based on similarity of abundances (i.e.
feature values) across samples. See also AbundanceSimilarityParam()
for
additional information and details.
This help page lists parameters specific for xcms
result objects (i.e. the
XCMSnExp()
object). Documentation of the parameters for the similarity
calculation is available in the AbundanceSimilarityParam()
help page in
the MsFeatures
package.
# S4 method for XCMSnExp,AbundanceSimilarityParam groupFeatures( object, param, msLevel = 1L, method = c("medret", "maxint", "sum"), value = "into", intensity = "into", filled = TRUE, ... )
object |
|
---|---|
param |
|
msLevel |
|
method |
|
value |
|
intensity |
|
filled |
|
... | additional parameters passed to the |
input XCMSnExp
with feature group definitions added to a column
"feature_group"
in its featureDefinitions
data frame.
feature-grouping for a general overview.
Other feature grouping methods:
groupFeatures-eic-correlation
,
groupFeatures-similar-rtime
Johannes Rainer
## Performing a quick preprocessing of a test data set. library(faahKO) fls <- c(system.file('cdf/KO/ko15.CDF', package = "faahKO"), system.file('cdf/KO/ko16.CDF', package = "faahKO"), system.file('cdf/WT/wt19.CDF', package = "faahKO")) od <- readMSData(fls, mode = "onDisk")#>xod <- findChromPeaks( od, param = CentWaveParam(noise = 10000, snthresh = 40, prefilter = c(3, 10000)))#>#>#>#>#>#>#>#>#>#>#>#>#>#>## Group features based on correlation of feature values (integrated ## peak area) across samples. Note that there are many missing values ## in the feature value which influence grouping of features in the present ## data set. xodg_grp <- groupFeatures(xodg, param = AbundanceSimilarityParam(threshold = 0.8)) table(featureDefinitions(xodg_grp)$feature_group)#> #> FG.001 FG.002 FG.003 FG.004 FG.005 FG.006 FG.007 FG.008 FG.009 FG.010 FG.011 #> 1 9 13 5 4 7 1 1 1 1 1 #> FG.012 FG.013 FG.014 FG.015 FG.016 FG.017 FG.018 FG.019 FG.020 FG.021 FG.022 #> 1 1 1 1 1 1 1 1 1 1 1 #> FG.023 FG.024 FG.025 FG.026 FG.027 FG.028 FG.029 FG.030 FG.031 FG.032 FG.033 #> 1 1 1 1 1 1 1 1 1 1 1 #> FG.034 FG.035 FG.036 FG.037 FG.038 FG.039 FG.040 FG.041 FG.042 FG.043 FG.044 #> 1 1 1 1 1 1 1 1 1 1 1 #> FG.045 FG.046 FG.047 FG.048 FG.049 FG.050 FG.051 FG.052 FG.053 FG.054 FG.055 #> 1 1 1 1 1 1 1 1 1 1 1 #> FG.056 FG.057 FG.058 FG.059 FG.060 FG.061 FG.062 FG.063 FG.064 FG.065 FG.066 #> 1 1 1 1 1 1 1 1 1 1 1 #> FG.067 FG.068 FG.069 FG.070 FG.071 FG.072 FG.073 FG.074 FG.075 FG.076 FG.077 #> 1 1 1 1 1 1 1 1 1 1 1 #> FG.078 FG.079 FG.080 FG.081 FG.082 FG.083 FG.084 FG.085 FG.086 FG.087 FG.088 #> 1 1 1 1 1 1 1 1 1 1 1 #> FG.089 FG.090 FG.091 FG.092 FG.093 FG.094 FG.095 FG.096 FG.097 FG.098 FG.099 #> 1 1 1 1 1 1 1 1 1 1 1 #> FG.100 FG.101 FG.102 FG.103 FG.104 FG.105 FG.106 FG.107 FG.108 FG.109 FG.110 #> 1 1 1 1 1 1 1 1 1 1 1 #> FG.111 FG.112 FG.113 FG.114 FG.115 FG.116 FG.117 FG.118 FG.119 FG.120 FG.121 #> 1 1 1 1 1 1 1 1 1 1 1 #> FG.122 FG.123 #> 1 1## Group based on the maximal peak intensity per feature xodg_grp <- groupFeatures(xodg, param = AbundanceSimilarityParam(threshold = 0.8, value = "maxo")) table(featureDefinitions(xodg_grp)$feature_group)#> #> FG.001 FG.002 FG.003 FG.004 FG.005 FG.006 FG.007 FG.008 FG.009 FG.010 FG.011 #> 1 9 13 5 4 7 1 1 1 1 1 #> FG.012 FG.013 FG.014 FG.015 FG.016 FG.017 FG.018 FG.019 FG.020 FG.021 FG.022 #> 1 1 1 1 1 1 1 1 1 1 1 #> FG.023 FG.024 FG.025 FG.026 FG.027 FG.028 FG.029 FG.030 FG.031 FG.032 FG.033 #> 1 1 1 1 1 1 1 1 1 1 1 #> FG.034 FG.035 FG.036 FG.037 FG.038 FG.039 FG.040 FG.041 FG.042 FG.043 FG.044 #> 1 1 1 1 1 1 1 1 1 1 1 #> FG.045 FG.046 FG.047 FG.048 FG.049 FG.050 FG.051 FG.052 FG.053 FG.054 FG.055 #> 1 1 1 1 1 1 1 1 1 1 1 #> FG.056 FG.057 FG.058 FG.059 FG.060 FG.061 FG.062 FG.063 FG.064 FG.065 FG.066 #> 1 1 1 1 1 1 1 1 1 1 1 #> FG.067 FG.068 FG.069 FG.070 FG.071 FG.072 FG.073 FG.074 FG.075 FG.076 FG.077 #> 1 1 1 1 1 1 1 1 1 1 1 #> FG.078 FG.079 FG.080 FG.081 FG.082 FG.083 FG.084 FG.085 FG.086 FG.087 FG.088 #> 1 1 1 1 1 1 1 1 1 1 1 #> FG.089 FG.090 FG.091 FG.092 FG.093 FG.094 FG.095 FG.096 FG.097 FG.098 FG.099 #> 1 1 1 1 1 1 1 1 1 1 1 #> FG.100 FG.101 FG.102 FG.103 FG.104 FG.105 FG.106 FG.107 FG.108 FG.109 FG.110 #> 1 1 1 1 1 1 1 1 1 1 1 #> FG.111 FG.112 FG.113 FG.114 FG.115 FG.116 FG.117 FG.118 FG.119 FG.120 FG.121 #> 1 1 1 1 1 1 1 1 1 1 1 #> FG.122 FG.123 #> 1 1