Institute for Advanced Biosciences Keio University
MathDAMP Mathematica package for differential analysis of metabolite profiles
Home Overview Examples Downloads TriDAMP References Contact
MathDAMP > Examples > MathDAMP source > Core Functionality > Applying a function to a single dataset

Applying a function to a single dataset

DAMPApplyFunctionToSingle applies a pure function function to the signal intensities of msdata (msdata[[1]]). This generic function could be wrapped by functions like DAMPSubtractBaselines, DAMPThreshold, DAMPRemoveSpikes, DAMPSmooth, etc. However, it is not done so for simplicity (at the expense of having redundant code though).

Options[DAMPApplyFunctionToSingle] = {Global`SampleNameSuffix""} 

DAMPApplyFunctionToSingle[msdata_, func_, opts___] := Module[{tmpdat}, tmpdat = func ... , Global`SampleNameSuffix/.{opts}/.Options[DAMPApplyFunctionToSingle]] ; tmpdat]