Create parameter lists for averaging MS peak list data.
getDefAvgPListParams(...)
getDefAvgPListParams
returns a list
with the peak list averaging parameters.
The parameters set used for averaging peak lists are set by the avgFeatParams
and avgFGroupParams
arguments to generateMSPeakLists
and its related algorithm specific functions. The parameters are
specified as a named list
with the following values:
clusterMzWindow
m/z window (in Da) used for clustering m/z values when spectra are
averaged. For method="hclust"
this corresponds to the cluster height, while for method="distance"
this
value is used to find nearby masses (+/- window). Too small windows will prevent clustering m/z values (thus
erroneously treating equal masses along spectra as different), whereas too big windows may cluster unrelated
m/z values from different or even the same spectrum together.
topMost
Only retain this maximum number of MS peaks when generating averaged spectra. Lowering this
number may exclude more irrelevant (noisy) MS peaks and decrease processing time, whereas higher values may avoid
excluding lower intense MS peaks that may still be of interest.
minIntensityPre
MS peaks with intensities below this value will be removed (applied prior to selection
by topMost
) before averaging.
minIntensityPost
MS peaks with intensities below this value will be removed after averaging.
avgFun
Function that is used to calculate average m/z values.
method
Method used for producing averaged MS spectra. Valid values are "hclust"
, used for
hierarchical clustering (using the fastcluster package), and "distance"
, to use the between peak
distance. The latter method may reduces processing time and memory requirements, at the potential cost of reduced
accuracy.
pruneMissingPrecursorMS
For MS data only: if TRUE
then peak lists without a precursor peak are
removed. Note that even when this is set to FALSE
, functionality that relies on MS (not MS/MS) peak lists
(e.g. formulae calulcation) will still skip calculation if a precursor is not found.
retainPrecursorMSMS
For MS/MS data only: if TRUE
then always retain the precursor mass peak even
if is not amongst the topMost
peaks. Note that MS precursor mass peaks are always kept. Furthermore, note that
precursor peaks in both MS and MS/MS data may still be removed by intensity thresholds (this is unlike the
filter
method function).
The getDefAvgPListParams
function can be used to generate a default parameter list. The current defaults are:
clusterMzWindow=0.005
; topMost=50
; minIntensityPre=500
; minIntensityPost=500
; avgFun=mean
; method="hclust"
; pruneMissingPrecursorMS=TRUE
; retainPrecursorMSMS=TRUE
With Bruker algorithms these parameters only control generation of feature groups averaged peak lists: how peak lists for features are generated is controlled by DataAnalysis.
Averaging of mass spectra algorithms used by are based on the msProcess R package (now archived on CRAN).
fastcluster1