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 > Plotting chromatograms/electropherograms

Plotting chromatograms/electropherograms

DAMPPlotChromatogram[msdatas,mz,options] plots overlaid chromatograms/electropherograms from msdatas (a list of msdata datasets) corresponding to m/z mz. mz may be a list of m/z values as well. The chromatograms/electropherograms may be annotated. Annotation table is passed via the AnnotationTable option. The Resolution option specifies to which resolution the data were binned along the m/z dimension. The m/z values in the annotation table are then rounded accordingly to ensure the appropriate annotation labels are selected for annotating the chromatogram/electropherogram.
The legend is drawn explicitly. For an unknown reason, this is considerably faster than Mathematica's PlotLegend function. Due to this, significant amount of time can be saved when plotting numerous chromatograms/electropherograms (using the DAMPPlotCandidates function for example).
Legend elements can be specified either explicitly (assigning a list in the form {{color,label},...} to the LegendData option) or created automatically (LegendData->Automatic). In the latter case, SampleName from each msdata is used as a legend label.
MultipleListPlot is used for plotting the chromatograms/electropherograms. Options for the MultipleListPlot function can be passed via the PlotOptions option. These options then override the options determined by options passed to the DAMPPlotChromatogram function. This approach of using the PlotOptions option to pass options to the function used for plotting the data is used throughout the MathDAMP package. It can also be found in functions like DAMPDensityPlot and DAMPPlotPeakLayout.

Options[DAMPPlotChromatogram] = {Global`Resolution1, Global`AnnotationTable  ... 54;670, SymbolShapeNone, AspectRatio.23, TextStyleGlobal`DAMPTextStyle}}

DAMPPlotChromatogram[msdatas_/;Depth[N[msdatas]] 5, mz_, opts___] := Module[{annotta ...  AspectRatioar, ImageSizeis, DisplayFunctiondispfunc] ] 

DAMPPlotChromatogram[msdatas_/;Depth[N[msdatas]] 4, mz_, opts___] := DAMPPlotChromatogram[{msdatas}, mz, opts]