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 > Dataset filtering

Dataset filtering

The DAMPFilter function uses one dataset as a criteria to filer out datapoints from a different dataset (although the two could be identical). A pure function to process the signal intensity matrix of the criteria dataset is passed as a parameter. The signal intensity values in the processed criteria dataset determine the fate of signal intensities in the filtered dataset. Signal intensities in the filtered dataset for which the corresponding signal intensities in the processed criteria dataset are zero are leveled to zero as well (or left unchanged if the corresponding signal intensities from the criteria dataset are non-zero).
A simpler version of the DAMPFilter function which accepts a numeric threshold value instead of the processing function is defined. Signal intensities in the filtered dataset are leveled to 0 if the absolute values of the corresponding signal intensities in the criteria dataset do not exceed the threshold value.
The dataset to be filtered and the criteria dataset must have identical dimensions (in other words, be aligned or identical).

Options[DAMPFilter] = {Global`SampleNameSuffix"f"} <br />

DAMPFilter[msdata_, criteriamsdata_, threshold_ ? NumericQ, opts___] := Module[{}, DAMPFilter[msdata, criteriamsdata, Chop[1.#, threshold] &, opts] ] 

DAMPFilter[msdata_, criteriamsdata_, filtfunc_, opts___] := Module[{},  {msdata{ ... leName[msdata〚4〛, Global`SampleNameSuffix/.{opts}/.Options[DAMPFilter]]} ]

The DAMPTrendFilter function filters out those datapoints from the result of averages of two groups, where at least a certain number of signal intensities from both groups does not follow the same trend (greater or smaller than the average of the other group) as the averages of the groups.

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

DAMPTrendFilter[msdatas1_, msdatas2_, tofiltermsdata_, filtnum_, opts___] := Module[{tmpset, ... ermsdata〚4〛, Global`SampleNameSuffix/.{opts}/.Options[DAMPTrendFilter]]} ]