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 > Data Import/Export > Agilent ChemStation MS format

Agilent ChemStation MS format

The DAMPImportMS function imports the raw data from an Agilent ChemStation *.MS file and processes it into the MathDAMP internal format. Although the description of the file format is not available (?) and the format was reverse-engineered, the imported data appear to perfectly match the data in a csv file exported using the ChemStation software.
Part of the code from  the DAMPImportMS function was moved to a compiled function DAMPProcessDataMS[mzintensitypairs,scanpositions] to speed up the data processing.
The signal intensities are binned to 1 m/z unit resolution upon loading.

DAMPProcessDataMS = Compile[{{data, _Integer, 1}, {positions, _Integer, 2}}, Module[{procdat ... amp;/@cnttbl ; tbl/cnttbl) &/@procdata ; Join[{allmzs}, findata] ]] 

DAMPImportMS[filename_] := Module[{data, msnr, pos, positions, trheaders, timepoints, findat ... op[Flatten[Transpose[#[mainhead, 2^8] &/@{Quotient, Mod}]], 1], #≠0&]]}} ]