# Recording data exploration discoveries

When doing mass analysis work it is often desirable to store the painstakingly manually picked &mz; or &mr; values for later use. &MineXp; provides a flexible process allowing one to record the data discoveries during the exploration of a mass data set to any combination of the following destinations: file, clipboard, console.

In order to record the innumerous analysis steps that result from a data exploration session, the configuration of the discoveries storage must have been done by accessing Preferences Edit preferences... and then selecting the Discoveries section, as described in .

In that window, the user can select the destination of the data analysis recording system: console, clipboard, file or any combination of the three. When selecting file recording, the user might specify if the recording would overwrite any preexisting file or, instead, append to that file. Depending on the kind of plot where data exploration occurs, the format of the data to be recorded needs to change. Indeed, it would make no sense to record the charge z when exploring data in the Drift spectra window. This is why the text format of the data export needs to be defined for each one of the three kinds of plots: TIC/XIC chromatogram, mass spectrum or drift spectrum (Specialized formats group box).

Before delving into the configuration intricacies, let us tell immediately how to trigger the recording of the exploration discoveries: using the SPACE bar in the composite plot widget containing the graph being analyzed.

The text format specification can contain particular tokens as described below.

Almost all the format string elements below are numeric (representing either integer or float values). For float values, it is possible to define the number of decimals to be used when printing the value. The decimals specifier is of the form .<number>, like .3.

When used with a format string, that gives %X.3, which specifies that when printing out the x-axis value, 3 decimals should be added after the decimal point. To prevent decimal at all, do not use any decimal specifier at all (%X).

- %f : mass spectrometry data file name.

- %s : sample name.

- %X : value on the x-axis of the graph (no unit). For a drift spectrum, that would be ion mobility times, for a mass spectrum, that would be &mz; values, for a TIC/XIC chromatogram, that would be retention times.

- %Y : value on the y-axis of the graph (no unit). This value corresponds to the value at the cursor point (not at a point on the curve). In all the graph plots, that would be intensities in any unit provided by the mass spectrometer (typically, counts).

- %C : value on the y-axis of the graph (no unit). This value corresponds to the value at the curve of the selected trace plot (not at the cursor point). In all the graph plots, that would be intensities in any unit provided by the mass spectrometer (typically, counts).

- %x : delta value on the x-axis (when appropriate, no unit).

- %y : delta value on the y-axis (when the mouse has been dragged enough to draw a rectangle). The delta value is computed as the difference between the y-axis value at the mouse drag start point and the y-axis value at the mouse drag stop point.

- %c : delta value on the y-axis (when the mouse has been dragged enough to draw a rectangle). The delta value is computed as the difference between the y-axis value on the curve at the mouse drag start point and the y-axis value on the curve at the mouse drag stop point.

- %I : TIC intensity after TIC integration over a graph range

- %b : x-axis range begin point for the computation (where applicable, for example for the TIC integration to a single value).

- %e : x-axis range end point for the computation (where applicable).

- For mass spec plot widgets:

  - %z : charge

  - %M : &mr; as computed during deconvolution (see ).

It is important to keep in mind that the %z and %M format strings can only work if the user is actually analyzing a mass spectrum and if the user has effectively performed a deconvolution operation that has allowed computing these two values. If the values are not available, the program shows the format string untouched (%M, for example) in the textual output upon hitting the SPACE bar (see below). Likewise, the %I format string will only hold meaningful data if an integration to a single TIC intensity value has been determined (see ) for that specific data analysis record.

The recording of data analysis steps works in any trace plot widget (not yet in the color map plot widgets) even if there are more than one trace in a given plot widget. In the case the plot widget has more than one trace and none or more than one is selected, the program will ask that a single trace be selected. If data are to be scrutinized for more traces, simply select each trace in turn and trigger the analysis stanza to be output using the SPACE bar each time.

Once configured, the format strings might be stored in a drop down box for later use. To that end, click onto the Add to history button while having the format text displayed in the text editor and it will be appended to the drop-down list. The list gets stored when the dialog window is closed and will be filled-up again when the program is restarted.

As an example, if the user defined the following format string for a mass spectrum:

        Mass spec. :
        mz = (%X, %Y) z = %z
        filename = %f
        date = 20161021
        session = 20161021
        mslevel = 1 msion = esi msanal = tof
        chrom = DEAE fraction = 25
        seq =  pos =     oxlevel = 0 pos =
        intensity =
        comment =

Then, a resulting data exploration stanza that would be recorded will look like this:

        Mass Spec. :
        mz = (1051.8, 50863) z = 1
        filename = 20161017-rusconi-frac-25-deae-20160712.mzml
        date = 20161021
        session = 20161021
        mslevel = 1 msion = esi msanal = tof
        chrom = DEAE fraction = 25
        seq =  pos =     oxlevel = 0 pos =
        intensity =
        comment =

Interestingly, the user can define any kind of format, leaving fields available for later filling-in. This feature is of immense value when the analysis file is used later to fill-in a database for easy storage and interrogation of the exploration discoveries. In this case, it would be useful to have the file opened in an editor and at each new stanza, edit the comment field if something needs to be commented, like the shape/intensity of a mass peak, for example.

Note that the program closes the file each time a new stanza has been written. This makes it possible to edit that file safely in between each stanza record. Remember to force the editor to reload the file from disk after each exploration discovery recording.

When the recording involves sending the analysis data to the console, the data are sent to it as text that is colored the same as the spectrum that was under scrutiny.

When the mouse cursor has been placed at the proper location on the graph (with or without &lmb;-click-dragging, depending on the situation), the user hits the SPACE bar and the data analysis stanza is recorded to the selected destination(s): console, clipboard, file.