combinePeaksWithSameFormula: Combine rows of an ftmsData object with the same mass formula

View source: R/combinePeaksWithSameFormula.R

combinePeaksWithSameFormulaR Documentation

Combine rows of an ftmsData object with the same mass formula

Description

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)

Usage

combinePeaksWithSameFormula(ftmsObj)

Arguments

ftmsObj

data of type peakData

Details

It is recommended to call the combinePeaksWithSameFormula function before using mapPeaksToCompounds.

Value

peakData object where now two rows of e_data map to the same mass formula

Examples

new_data <- combinePeaksWithSameFormula(exampleProcessedPeakData)

EMSL-Computing/fticRanalysis documentation built on Dec. 18, 2024, 9:51 p.m.