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 cropping and particular m/z(s) dropping/selection

Dataset cropping and particular m/z(s) dropping/selection

DAMPCrop[msdata,options] selects datapoints from msdata falling within the m/z and time ranges specified by options mzRange and TimeRange.
DAMPSelectMZs[msdata,mzs] reduces the msdata to those datapoints only, which correspond to m/z values specified in the  mzs list.
DAMPDropMZs[msdata,mzs] drops datapoints from msdata corresponding to m/z values specified in the  mzs list.
The mzs parameters are multiplied by 1. to make sure they are of Real  type. This is necesarry for looking up the m/z values in the datasets' lists of m/z values which are of type Real.

Options[DAMPCrop] = {Global`TimeRangeAll, Global`mzRangeAll} 

DAMPCrop[msdata_, opts___] := Module[{timerange, mzrange, selmzposs, seltpposs, newints, new ... ltpposs〛]] ;  {newints, newmzs, newtimepoints, msdata〚4〛} ]

DAMPSelectMZs[msdata_, mzs_] := Module[{newmzs, selmzposs}, newmzs = Intersection[ms ... )]) &/@newmzs) 〛, newmzs, msdata〚3〛, msdata〚4〛} ]

DAMPDropMZs[msdata_, mzs_] := Module[{newmzs, selmzposs}, newmzs = Complement[msdata ... )]) &/@newmzs) 〛, newmzs, msdata〚3〛, msdata〚4〛} ]