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 > BDT format

BDT format

DAMPImportBDT[filename,samplename] function imports data from a BDT file and processes it into MathDAMP internal format. The BDT is a binary datafile used internally by Institute for Advanced Biosciences (Keio University). Separate in house software for preprocessing of the Analyst QS generated csv files stores the data in the BDT format. The organization of data in the BDT format is similar to the internal MathDAMP organization what allows a fast data import into Mathematica. Since the csv file does not contain the information about the sample name, this has to be specified via the second parameter samplename.

DAMPImportBDT[filename_, samplename_] := Module[{tmp}, tmp = BinaryReadList[filename ... ]], Take[tmp, {5, 4 + tmp〚4〛}], {Global`SampleNamesamplename}} ] ;

DAMPExportBDT[filename,msdata] function exports data in MathDAMP internal format into a BDT file format specified by filename.  Since the m/z values in the data are not saved one by one but as a range specified by min, max and step, only data having a regular list of m/z values which can be converted to the range representation should be exported.

DAMPExportBDT[filename_, msdata_] := Module[{strm}, strm = OpenWrite[filename, Binar ... 12314;1〛], "Real64", ByteOrdering -1] ; Close[strm] ; ]