sgibb / MALDIquant

Quantitative Analysis of Mass Spectrometry Data
https://strimmerlab.github.io/software/maldiquant/
60 stars 25 forks source link

fix TIC calculation #29

Closed sgibb closed 11 years ago

sgibb commented 11 years ago

Currently the TIC is calculated by sum(spectrum@intensity) but this is only correct if all spectrum@mass values are equally spaced. For most spectra generated by Bruker devices this isn't true, because the difference between to mass values increases. Something like (head(intensity, -1)+tail(intensity, -1))/2 * diff(mass) is needed.