R/combinePeaksWithSameFormula.R
combinePeaksWithSameFormula.Rd
If multiple peaks are mapped to the same mass formula it can cause problems
or inconsistencies when mapping data to a biological database. The
combinePeaksWithSameFormula
combines rows of ftmsObj$e_data
that map to the same mass formula:
* If data is abundance: values are summed for each column
* If data is log scale: data are converted to abundance, then values are summed for each columns and re-transformed to the original scale
* If data is presence/absence: 'or' function is applied to each column (if at least one peak is observed, the peak is denoted as observed)
combinePeaksWithSameFormula(ftmsObj)
data of type peakData
peakData
object where now two rows of e_data
map to the same mass formula
It is recommended to call the combinePeaksWithSameFormula
function
before using mapPeaksToCompounds
.
new_data <- combinePeaksWithSameFormula(exampleProcessedPeakData)