sneumann / xcms

This is the git repository matching the Bioconductor package xcms: LC/MS and GC/MS Data Analysis
Other
177 stars 81 forks source link

Add possibility to perform peak density correspondence considering m/z dependent margins #712

Closed jorainer closed 5 months ago

jorainer commented 5 months ago

This PR adds the possibility to perform peak density-based correspondence using m/z-dependent bin sizes. The PeakDensityParam gains a parameter ppm with a default of ppm = 0 in which case the original approach is used that groups chrom peaks in equal(fixed)-sized bins along the m/z dimension. By setting ppm to a value larger than 0 m/z-dependent bin sizes will be used instead: the bins along m/z increase with ppm of the m/z value hence better modeling the m/z dependent measurement precision/error of e.g. TOF instruments.

See also issue #711 for discussion and https://github.com/sneumann/xcms/issues/711#issuecomment-1893389759 for the consequence of such correspondence analysis.

jorainer commented 5 months ago

Commit https://github.com/sneumann/xcms/pull/712/commits/c8a27d59335b09506645a749173225b1900b4ffc in addition adapts (actually fixes) the featureArea function that is used to extract the m/z and rt boundaries for each feature. This function is used for featureChromatograms, gap-filling with ChromPeakAreaParam and EIC-based feature grouping. The function was now also better documented, which results in a quite large number of changes.

jorainer commented 5 months ago

thanks for merging @sneumann !