# Isotopic cluster calculations

isotopic cluster libIsoSpec++

When the resolving power of the mass spectrometer is good, zooming-in on a mass peak may reveal that a given ion has given rise not to one peak but to a set of peaks that together form an isotopic cluster . The ions below the different cluster peaks are called isotopologues because they are homologues of the analyte that have different numbers (and therefore positions) of the different isotopes.

While the richness of mass spectra acquired with high resolving power machines has been neglected for many years, it is now well established that using the resolved isotopic cluster peaks for the detailed analysis of mass spectra is of great use.

When performing mass spectrometric data analyses, it is very often necessary to calculate the isotopic cluster of a given analyte. Indeed, the isotopic cluster can be a criterion helping to establish if a given detected signal (the acquired isotopic cluster) does indeed correspond to a given chemical entity, and matching the experimental isotopic cluster with one simulated for the evaluated chemical entity might prove useful. This way of ascertaining the assignment of mass peaks to specific analytes is becoming more and more desirable as mass spectrometers have ever-greater resolving power capabilities, thus providing the user with neatly resolved isotopic clusters even for oligomers of intermediate masses. In this section, the process of calculating the isotopic cluster of a given analyte defined by its chemical composition (also called elemental composition or formula) is described in detail.

It is possible to predict how a given ion (of known elemental composition and charge) is supposed to be revealed as an isotopic cluster in a high resolution mass spectrum. One such cluster is shown in , for a protein in its deca-protonated form [M+10H+]10+, of ionic elemental composition C769H1222N210O218S2.

Simulation of the isotopic cluster for a protein

Calculated isotopic cluster for a deca-protonated protein.

&MassXp; provides a sophisticated interface to the `libIsoSpec++` library.

> IsoSpec: Hyperfast Fine Structure Calculator

> Mateusz K. Łącki, Michał Startek, Dirk Valkenborg, and Anna Gambin

> Analytical Chemistry, 2017, 89, 3272–3277

> DOI: 10.1021/acs.analchem.6b01459

This library performs high-resolution isotopic cluster calculations. In order to run the calculations, it is necessary to have the following items ready:

- The elemental composition of the analyte (for example, H2O1). This formula needs to account for the ionization agent that is involved in the ionization of the analyte prior to its detection in the mass spectrometer. If an analyte is deca-protonated, 10 protons need to be added to its neutral-state formula.

- A detailed isotopic configuration of all the chemical elements that are found in the elemental composition. &MassXp; provides three interfaces to define the isotopic characteristics of the chemical elements. These will be described in the following sections.

## Generating an isotopic cluster simulation in &MassXp;

To perform an isotopic cluster simulation in &MassXp;, select the first submenu of the main Isotopic clusters menu ( ).

Isotopic clusters main menu

Two menu items are available, one to compute the isotopic cluster centroids starting from a formula and one to shape the mass peaks around the centroids, so that their profile matches the expected mass spectrum acquired on an instrument.

The window shown in contains all the interface elements required to configure the simulation starting from a formula.

Isotopic cluster generator window

The dialog window contains two panels. The left hand side panel configures the charge for which the calculation is to be carried over, the intensity of the highest peak in the isotopic cluster, and the maximum cumulative isotopic presence probability that IsoSpec must reach during the calculation. The right hand side panel contains a tab widget to hold the configuration tabs and the results tab.

An isotopic cluster calculation is most probably performed with the aim of simulating an expected isotopic cluster for an analyte that is being analyzed by mass spectrometry. It is thus logical that the analyte be in an ionized form. The way that the analyte has been ionized needs to be taken into account in the chemical formula that describes the ion for which the isotopic cluster is being calculated. For example, when determining the elemental composition of a protein in the positive ion mode, the number of protons used to ionize the protein needs to be taken into account in the formula.

The calculation is charge-agnostic in the sense that it does not know what element in the chemical formula is responsible for the ionization of the analyte. The ionization level of the analyte can be handled by &MassXp; if that information is set to the Ion charge spin box widget. By default, the charge state of the analyte is 1.

The Gaussian apex intensity value (a.u.) check box widget allows the user to set the intensity (y axis) that the isotopic cluster will have for its highest peak. This is useful when the isotopic cluster is to be simulated for direct comparison with an isotopic cluster in an experimental mass spectrum.

The Max. cumulative probability spin box widget serves to configure the extent to which IsoSpec simulates the theoretically expected isotopic cluster. A value of 0.99 tells the software to simulate enough combinations of the analyte isotopes to represent 99 % of the theoretically expected combinations.

For large biopolymers, it might be prudent to start with a relatively low value for Max. cumulative probability, because setting this value too high, that is, near 1, would increase notably the calculation duration.

The Cluster's centroid sorting group box widget contains a few widgets that the user can use to configure the way the generated cluster's (centroid, intensity) pairs are sorted in the output.

The Mass spectrum synthesis group box widget contains a few widgets that the user can use to configure the title and the color of the generated spectrum (the actual generation of the spectrum on the basis of the IsoSpec output is described in detail below). The title and color of the mass spectrum will be of use when the spectrum is displayed in the companion &MineXp; software program. The process by which the mass spectrum is transferred from &MassXp; to &MineXp; is described at .

To perform isotopic cluster calculations, the simulation software needs to be aware of all the isotopes of all the chemical elements that enter in the composition of the ionized analyte. An isotope is defined by its mass and by the probability that it is found in nature. Carbon has two major isotopes that can be found in nature: the &c12; most abundant isotope and the &c13; least abundant isotope (the &c14; isotope is irrelevant for conventional mass spectrometry unless molecules have been artificially enriched in that isotope).

There are three ways that the user might define the isotopic data to be used for the simulations. Two of them involve a configuration preparation on the part of the user. The third one, that we'll describe first, does not involve any chemical element configuration. The other ways are reviewed in the following sections.

### Static Standard Element Tables Shipped within the IsoSpec Library

In order to document all the chemical elements' isotopes' characteristics, the IsoSpec library has, in its own software code headers, a number of arrays that &MassXp; automatically loads up when opening the dialog window.

That process is performed at build time and is thus not configurable at run time.

These data are displayed in the IsoSpec standard static data tab. The table view widget data are loaded from source code each time the window is opened, hence the static qualifier in the tab name, meaning that the user won't be able to change these data and keep the changes between sessions.

In this tab, apart the configuration on the left hand side pane of the dialog window, all that is left to do is enter the elemental composition for which the isotopic cluster calculation is to be performed in the Formula combo box widget (which looks like a line edit widget with an arrow at its right side).

If a formula is used often, the user might want to store it with a label that explains what the elemental composition describes. To add a label to the formula, enter the label between quotes before the formula itself. To store the titled formula so that it will be available across sessions, click the + push button. To remove a stored formula, select in the combo box widget and click the − push button.

Once the formula has been set to its combo box widget, the charge of the ion needs to be set (Ion charge spin box widget) along with the Max. cumulative probability . To run the calculation, click Run.

### User-Modified Standard Element Table Shipped within the IsoSpec Library

While the previous section showed how to use the static element table from the IsoSpec library, this section shows a way to customize these elemental data for a specific experiment.

The user-modified version of the standard static isotopic data is available in the IsoSpec standard user data tab of the dialog window, which upon opening has an empty table view widget, as shown in .

User-modified standard element table

When started, the IsoSpec standard user data tab of the dialog window shows an empty table view widget. The way to populate the table view is described in the text.

The simplest way to fill in the user-modified standard isotopic table is to export the isotopic data from the IsoSpec standard static data tab to a text file (Save table data to file for further editing button). The data are output to the file in the CSV (comma-separated-values) format, in a layout that closely mimicks the data visible in the table view. An example of the exported text is shown in . Once the file has been saved, the data might be modified in the LibreOffice spreadsheet or in a text editor. For example, in case of an experiment involving the labeling of analytes with &c13; at an incorporation efficiency of roughly 98 %, the &c12; abundance (probability) would be set to to 0.02 and the &c13; abundance to 0.98 (in reality, the abundances calculation is a bit more subtle than that).

Isotopic exported from the isotopic data table view'

When saving isotopic data from the table view to a file, the generated text is in the comma-separated-values (CSV) format. In this format, the editing of the isotope masses and abundances is very easy in a text editor or in spreadsheet program.

Now that once the modifications have been performed, the file needs to be saved under the same format. It is then available for loading in the IsoSpec standard user data tab of the dialog window by clicking the Load table from file push button. The table view now shows the new isotope mass-abundance pairs. From now on, this tab may be used exactly like described above for the standard isospec static data-based work.

The cells of the table view widget are editable. The cells' contents may be edited by double-clicking the cell and entering the new value. The table view widget contents might then be exported to a file exactly as described above.

Once the formula has been set to its combo box widget, the charge of the ion needs to be set (Ion charge spin box widget) along with the Max. cumulative probability . To run the calculation, click Run.

### User hand-made isotopic configuration of an elemental composition

The last way the user might configure the chemical elements to be used for an isotopic cluster calculation is based on the fully manual description of the isotopes present in the elemental composition of interest. That configuration is performed in the Manual configuration tab of the dialog window. This method is slightly more involved than the previous one but provides also for a much greater flexibility: it allows one to create new chemical elements that might be required in specific labelling experiments. The manual configuration is carried over in the Manual configuration tab of the dialog. When start, this tab is empty, as shown in (the working sheet is blank).

Hand-made user isotopic configuration of an elemental composition

When the dialog is created, the tab is empty. To start creating element definitions, click Add element.

Upon creation of the dialog window, the Manual configuration tab is empty, with only two rows of buttons at the bottom of the tab. To start configuring chemical elements, click Add element to create an element group box that will contains a number of widgets organized in two rows:

- Top row, a line edit widget to receive the chemical element symbol, like C, for example;

- On the same row, a spin box widget in which to set the number of such atoms in the formula for which the isotopic cluster is being calculated;

- A button with a − label that removes all the element group box in one go;

- The bottom row contains an isotope frame widget with two spin boxes for the mass of the isotope being configured (left) and its corresponding abundance (right);

- In addition to the spin boxes, two buttons, with a plus or a − label, allow one to respectively add or remove isotope frames.

  It is not possible to remove all the isotope frames from an element group box, otherwise that element group box would become useless.

Once an isotope frame has been filled-up, a new line might be required to document another isotope for the same element. To create a new isotope frame widget, click any plus-labelled button in any of the isotope frames. Once a new frame is created, the spin box widgets that it contains are set to 0.00000. Fill-in these spin boxes with mass and abundance values and go on along this path to create as many isotopes as required.

Once all the isotopes for a given chemical element have been defined, a new element might be needed. For this, click Add element and start the configuration of the new element as described above.

The manual isotopic configuration of the chemical elements required to perform an isotopic cluster calculation for a given formula is tedious. The user may want to save a given configuration to a file (click Save configuration) so that it is easier to recreate automatically all the widgets upon loading of that saved configuration (click Load configuration).

The final configuration is shown in . The experiment that was configured above is the labelling of a glucose molecule with Cz, an imaginary chemical element that is like carbon but that has a &c14;. The glucose molecule (normal formula: C6H12O6) is labelled on one single carbon atom with an efficieny of 95 %. This means that, when the labelling fails (in 5 % of the cases) the carbon atom has its isotopes with usual probabilities (compounded by the fact that the unlabeled atom is found at that position only in 5 % of the cases). The isotopic abundances for the Cz element are thus:

- For &c12;: 0.05 * natural &c12; abundance;

- For &c13;: 0.05 * natural &c13; abundance;

- For &c14;: 0.95;

Typical manual configuration of the isotopic characteristics of the chemical elements

The user has configured a labelling experiment where a protonated glucose molecule is labelled at a single carbon position with a &c14; atom (the efficiency of the labeling is 95 %).

Note that the count of unlabeled carbon atoms is 5 (and not 6), that the hydrogen count is 13 (and not 12, because the glucose is protonated), and that the &c14;-labelled carbon atom is present only once.

When the configuration has been performed (a process that might reveal tedious), it can be exported to a text file for later reuse. The example of has been exported and is available as a text file depicted in .

The user manual configuration might be exported to a text file and loaded back

Use the Save configuration push button to export the configuration to a text file and the Load configuration push button to load a configuration from file.

As above, once the analyte's elemental composition has been defined, as just described, click Run.

### The results of the computation are centroids

Once the configurations have been terminated, the isotopic cluster calculations can finally be performed. In the manual configuration setting, the formula is automatically handled, since each chemical element that is defined goes along with the count of the corresponding atoms. In the case of the standard IsoSpec configuration (either modified or not), the user has to enter the chemical formula of the analyte in the Formula line edit widget.

Click Run. If the configuration was correct and the calculation could run properly, then the dialog window switches to the IsoSpec results tab ( ). That tab contains a text edit widget in which the results are displayed.

Note that the &mz; values calculated by IsoSpec are corrected by &MassXp; for the charge level that was specified in the left panel of the dialog window prior to their display in the results tab ( ).

Results from the isotopic cluster calculation

The computation generates the probability of the various combinations of all the isotopes that make the elemental composition submitted to it. The results are in the form of peak centroid values along with corresponding probabilities. The sum of the probabilities corresponds to the Max. cumulative probability value that was set by the user.

The results that are produced by IsoSpec represent the centroids of the peaks that make the isotopic cluster. The results are thus a set of &mzi; pairs that have not the characteristic shape (the profile) that is found in mass spectra. &MassXp; features the ability to give a shape to the centroid peaks. For that, click the To peak shaper push button to open the Peak Shaper dialog window preloaded with the list of peak centroids.

The Peak shaper dialog window's features might be used by themselves, not necessarily as the last step of an isotopic cluster simulation. To shape any peak starting from a centroid value and a corresponding intensity value, select the Utilities Mass peak shape calculations menu item. The left hand side text edit widget appears empty. Paste into it the centroid data, one centroid per line, with the &mz; value separated from the intensity by a space. Make sure to register the new centroid list by clicking the Isotopic cluster shaper push button.

The workings of this peak shaping feature is described in .

## Shaping the centroids of the isotopic cluster peaks into well-profiled peaks

As mentioned earlier, the isotopic cluster calculation produces the isotopic cluster in the form of a set of &mzi; pairs that represent the centroids of the isotopic cluster's peaks and their relative intensity (probability). There are other data simulations or analysis processes that lead to having mass peaks defined by a single centroid &mz; value and a corresponding intensity. Plotted to a graph, a centroid mass peak yields a bar, which is inadequate if the user is willing to simulate isotopic clusters to later compare these with experimental profiled mass peaks. The features in this dialog window aim at shaping each mass peak by creating a shape around the centroid (in specialized terms, this is the profile of the peak).

The shape of mass peaks is typically Gaussian or Lorentzian (or a mix thereof). In order to convert mass peak centroids into something that resembles a real profile mass peak, a mathematical formula can be applied, with some parameters to configure the shapes generated. &MassXp; makes the shaping of mass peaks accessible via the Isotopic clusters Isotopic cluster shaper menu item( ). The window that opens up is shown in

Setting-up of the centroid mass peak shaping process

This dialog window allows one to configure the shaping of mass centroid peaks. Setting a spectrum name in the Mass spectrum name line edit widget and choosing a plotting color will help recognize the result mass spectrum once displayed in the Mass spectra window in the &MineXp; companion software (see below).

The mass centroid peaks are listed in the Data centroid points (m/z,i) text edit widget. These values may come from different origins. They can be set automatically from the isotopic cluster calculation dialog window (see ); they can come from the user editing them in place; finally they can come from the user pasting text from the clipboard.

The width of the profile mass peak is determined either by setting the resolving power of the instrument or by setting the width of the peak at half maximum of its height (FWHM).

The profile mass peaks generated can be either of a Gaussian or of a Lorentzian shape. That parameter is configured by selecting the corresponding radio button widget. The number of points used to actually craft the shape of the peak is configurable in the Shape the peak using points spin box widget.

There are two ways to configure the width of the Gaussian/Lorentzian shape around the centroid peak. Either one knows the resolving power of the instrument, or one can measure the full width at half maximum (FWHM) of the experimental peak. The Resolving power group box widget contains all the widgets required to define that FWHM. Because the FWHM actually depends on the resolving power and the resolving power is computed using the &mz; value, there needs to be a Reference mass provided for the calculation. If the data in the text edit widget on the left hand side pane of the window is filled with data from an isotopic cluster calculation, the reference mass is the &mz; value of the most intense peak. If the data come from the user either pasting or editing text in the text edit widget, then it is their responsibility to fill in the reference mass.

To define the FWHM value, one can just enter it in the corresponding spin box widget. When the editing is finished and the focus leaves the spin box widget, the Bin size logic group box widget will have the FWHM radio button widget selected. The Resolving power spin box widget now contains the proper resolving power value, as computed using the FWHM value and the Reference mass.

To define the resolving power value, one can just enter it in the Resolving power spin box widget. When the editing is finished and the focus leaves the spin box widget, the Bin size logic group box widget will have the Resolving power radio button widget selected. The FWHM spin box widget now contains the proper FWHM value, as computed using the resolving power value and the Reference mass.

The end point of the configuration procedures described above is to have a proper &mz; bin size for the mass spectrum that is generated by the combination of the various peaks shapes. The greater the resolving power of the instrument, the smaller the FWHM value and thus the smaller the bin size. The bin size that is computed is displayed in the Bin size (Th) spin box widget inside of the Manually set the bin size group box widget. If checked, this group box widget becomes active to let the user set the bin size manually. Its computation does not occur anymore upon modification of the values of FWHM or of the resolving power or of the reference mass.

The successful configuration of the bin size, via the definition of the FWHM or of the resolving power takes a bit of patience. The Check parameters push button triggers a verification of the configuration and provides feedback about it in the line edit widget below the push button.

The Charge spin box widget allows setting the charge of the ions of which the centroid &mzi; pairs are listed in the text edit widget on the left hand side of the dialog window.

Use caution with the value entered in the Charge spin box widget

When the peak centroid data have been filled in by the isotopic cluster calculation dialog window, do not change this value (let it be 1, as the default). This is because the isotopic cluster calculation has already taken into account the charge that was set at that step.

If the peak centroid data have been filled by editing in place of pasting text, then the charge needs to be set according to the actual charge of the ions for which the centroid peaks are being shaped.

Once the peak shaping parameters have been checked, click Run . The dialog window shifts tab to Results, as shown in .

Shaped peaks mass spectral data

The mass spectral data corresponding to the combination of each individual shaped centroid peak are displayed in this tab. Plotting these data will produce nicely shaped profile peaks matching what would be seen by recording a mass spectrum on an instrument.

To ensure that various isotopic cluster calculation-based mass spectra can later be recognized, the user is advised, for the different simulations, to insert distinct names in the Mass spectrum name line edit widget. This name will be used later when creating the mass spectrum if the user asks that the mass spectrum be displayed by clicking Display mass spectrum. In the eventuality that the mass spectrum name is not changed from a simulation to the other, a safeguard process ensures that names are absolutely unambiguous by appending to the mass spectrum name the time at which the mass spectrum is displayed.

Once the mass spectrum has been generated by the peak shaper, it might be copied to the clipboard, for visualization in the companion &MineXp; software or any other software capable of reading space-separated-values files. It is also possible to actually trigger the automatic display of the spectrum in &MineXp; by clicking Display mass spectrum . In this case, &MassXp; will check if the &MineXp; program is available on the system, and if so, starts it automatically and transmits via the network the mass spectral data to be plotted.

The mass spectrum corresponding to the combination of all the shaped centroid peaks is shown in .

Isotopic cluster automatically displayed in &MineXp;

If the &MineXp; program is installed on the system, &MassXp; starts it and displays the isotopic cluster mass spectrum.

## Shaping the centroids of the isotopic cluster peaks into well-profiled peaks

It occurs many times that one wants to run multiples isotopic cluster calculations in order to combine the obtained shaped mass spectra into a single one. This requirement has some tricky implications. Because the formula for which the various isotopic clusters are computed is going to be different each time, the very first &mz; value of the resulting mass spectrum is going to be different each time. This means that when the &mz; bins are calculated, the very first bin will be rooted at a different &mz; value for each one of the mass spectra obtained for the different isotopic cluster calculations. Upon combination of the various mass spectra, even if the resolving power was the same, there will be artifacts visible in . This is called the unphased bins artifact .

Combination of mass spectra obtained for different isotopic cluster calculations

The top two spectra correspond to two isotopic cluster calculations for mono-charged analytes differing in mass by rougly 1 Da. The bottom spectrum correspond to the combination of the blue trace into a copy of the red trace. The unphased bins artifact is clearly visible, with what appears as spikes combined on top of the initial peak shape or at its left.

One way to avoid the unphased bins artifact is to manage the bin calculation prior to starting the isotopic cluster centroids shaping process. This is shown in .

Reusing the isotopic cluster shaper dialog window

When the isotopic cluster centroid peaks have been computed, right before sending them to the isotopic cluster shaper dialog window, check the Reuse the same shaper check box widget.

This has the effect of replacing the centroid peaks data to the same isotopic cluster shaper dialog window, so that other configuration data in it are not modified.

In the isotopic cluster shaper dialog window, there are some configuration steps that will ensure that all the isotopic cluster mass spectra share the same &mz; bin width and the same set of bins (they are thus phased ). The configuration steps are illustrated in .

Ensuring that the bins are phased in the various isotopic cluster mass spectra

By setting the &mz; range for which the bins have to be computed according to the FWHM value, the user ensures that multiple isotopic cluster mass spectra will combine without the unphased bins artifact .

In the figure, the user has pushed the pin on the right hand size of the Reference mass value, so that upon loading a new set of isotopic cluster centroids from the isotopic cluster generator window that value is not modified.

Another setting that is crucial is the &mz; range set in the Phase the bins to the m/z range group box widget. The start and top values descring the &mz; range need to encompass the whole set of &mz; values in all the mass spectra generated during the isotopic cluster generation session.

Upon editing of the second &mz; range value (the range end value), the Reference mass &mz; value is updated to correspond to the middle value of that range. If that value is not correct, the user may modify it right in the double spin box and that value is not going to change.

By using the settings described above, one can ensure that the combination of all the isotopic cluster mass spectra works without the artifact, as shown in .

In order for the combination to work perfectly, it is important that the &mz; integration parameters in the mass spectrum composite widgets in &MineXp; be set to No binning. This is because the bins are already set and phased correctly.

Avoiding the combination artifact due to having unphased bins

As visible, the combination of the top two mass spectra does not show the artifact.