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 > Assemblies of Core Functions for Common Tasks > Comparing multiple groups of replicates

Comparing multiple groups of replicates

One-way ANOVA is used to locate the differences among multiple groups of datasets. To reduce the amount of memory necessary to perform the calculations, the F ratio is calculated for each corresponding group of signal intensities separately (instead of doing it in a whole dataset fashion by transposing them appropriately - this approach proves to be memory demanding). A compiled function DAMPCalcFRatioFast for calculating the F ratio was implemented. It is used instead of Mathematica's ANOVA function to gain speed. However, the groups must contain an identical number of replicates as mentioned below.
Possibility to use an analogy of the absolute×relative plot (average of control datasets vs. the most distant average) was investigated, but the results did not meet the expectations for the datasets tested. This approach is therefore not used.

DAMPCalcFRatioFast calculates an F-ratio (one-way ANOVA) for data. Data is expected to contain a flat list of values. These are then grouped into groups each containing equal number of values determined by replicates. Every group must contain an equal number of replicates - a constraint enforced by this F ratio calculation procedure. This function is used by the DAMPMultiGroups function.

DAMPCalcFRatioFast = Compile[{{data, _Real, 1}, {replicates, _Integer}}, Module[{gro ... (groups - 1)/#] &[totals〚 -1〛/(groups (replicates - 1))] ] ] ;

Options[DAMPMultiGroups] = {Global`NormalizeGroupOptions {}, Global`GroupNamesAutomatic} 

DAMPMultiGroups[msdatas_, replicates_, opts___] := Module[{normopts, groupnames, rslt, finda ... " : "<>#) &/@groupnames)))}}, Global`GroupNamesgroupnames} ]