PROCEDURE
∆ CRITICAL Many of the steps are prefaced by the term “optional”. This means that technically future steps are not dependent on these having been performed. However, they can provide additional information, or they can alter the outcome of the analysis.
[Steps from 1 to 13 are necessary to import data into MATLAB environment. For data already in MATLAB format including "Supplementary Data":http://cidtransfer.cid.csic.es/descarga.php?enlace1=d5e1de55b1d9b83b1668fc81e151e2ea move directly to Step 14]
==**== Data conversion *steps
The following data conversion procedures are described for the distinct LC-MS vendors. In all cases, an external software called ProteoWizard can be used for data conversion (option A). On the other hand, specific vendor softwares can also be used with the same purpose. In this protocol we show two examples of data conversion using the specific vendor softwares of Waters and Thermo Fisher Corporations (options B and C).
(A) Waters / Thermo Fisher / Agilent / AB Sciex / Bruker vendors (using ProteoWizard software)
1| Install Proteowizard software as described in the web (proteowizard.sourceforge.net).
2| Go to MSConvert options, as shown in Figure 1.
3| Click ´Browse´ and select the source folder of the raw data files (.d) to convert. Multiple files can be selected at once, to be converted in batch mode.
4| Click the button ´Add´.
5| Select the output directory.
6| Select the output format (mzXML or txt).
7| Click ´Start´ to begin file conversion.
(B) Waters Corporation (using MassLynx software)
1| Open the Databridge interface of the MassLynx file converter as shown in Figure 2.
2| Click ´Select´ and browse the raw data files (.raw) to convert by searching on the directory where it is stored.
3| Click ´Options´ and specify the source of the raw files (MassLynx) and the target output format which must be netCDF for cdf files or ASCII for txt files.
4| Indicate the output directory where the new file will be stored and indicate the filename. Although the filename is already prefilled with the same name of the raw data file, it can be changed.
5| Click ´Convert´ to begin file conversion. A new box will appear indicating the % of completeness of the data conversion process.
? TROUBLESHOOTING
(C) Thermo Fisher vendor (using Xcalibur software)
1| Go to ´Tools > File Converter´as shown in Figure 3.
2| Specify the source data type.
3| Click ´Browse´ and select the source folder of the raw data files (.raw) to convert.
4| Select the desired files to convert. Multiple files can be selected at once, and all files are selected automatically by clicking on the button ‘Select All’.
5| Click the button ´Add Job(s)´.
6| Select the destination path and data type, ANDI Files for cdf format or Text Files for the txt format.
7| Click ´Convert´ to begin file conversion.
==**== Starting and Data import steps using Bioinformatics *ToolboxTM
8| Start MATLAB.
9| Navigate to the folder containing converted data files in cdf or mzXML formats, using the ´Current Folder´ panel in MATLAB.
10| Run the function InfoStruct= mzcdfinfo (File) or InfoStruct= mzxmlinfo (File) in the ‘Command Window’ panel in MATLAB. InfoStruct variable will appear in the workspace.
mzcdfinfo and mzxmlinfo functions extract the information of the netCDF or mzXML files, respectively, returning a MATLAB structure, named InfoStruct.
11| (Optional) Before going forward with the remaining procedure, have a look at the InfoStruct variable generated.
InfoStruct variable contains the following fields: Filename (name of the file), FileTimeStamp (date time stamp of the file), FileSize (size of the file in bytes), NumberOfScans (number of scans in the file), StartTime (run start time), EndTime (run end time), TimeUnits (units for time), GlobalMassMin (minimum m/z value in all scans), GlobalMassMax (maximum m/z value in all scans), GlobalIntensityMin (minimum intensity value in all scans), GlobalIntensityMax (maximum intensity value in all scans) and ExperimentType (indicates if data is raw or centroided).
12| Run the function mzCDFStruct= mzcdfread (File) or mzXMLStruct= mzxmlread (File) in the ´Command Window´ panel in MATLAB. mzCDFStruct or mzXMLStruct variables will appear in the workspace.
mzcdfread and mzxmlread functions read MS data from the netCDF or mzXML files and give as an output argument a MATLAB structure (i.e., mzCDFStruct or mzXMLStruct) containing information of the LC-MS data.
13| Run the function [Peaks, Time]= mzcdf2peaks (mzCDFStruct) or [Peaks, Time]= mzxml2peaks (mzXMLStruct) in the ‘Command Window’ panel in MATLAB. A cell array named peaks and a vector named time will appear in MATLAB workspace.
These functions extract peak information from the MATLAB structures mzCDFStruct or mzXMLStruct created by mzcdfread or mzxmlread functions, respectively. The cell array named peaks contains mass/charge (m/z) and ion intensity values at each of the scans and the vector time gives information of the retention times associated with the LC-MS data set.
∆ CRITICAL STEP LC-MS data must be in netCDF or mzXML formats for their import. No other formats are accepted. Other file types need to be re-formatted (go back to Step 1) to match the input file requirements of Bioinformatics ToolboxTM data import tools.
[ The following steps can be directly applied to the "Supplementary Data":http://cidtransfer.cid.csic.es/descarga.php?enlace1=d5e1de55b1d9b83b1668fc81e151e2ea provided with the present study. If used with new data, it must be imported to MATLAB obeying the steps previously explained (Steps 1 to 13). However, for a better understanding of the protocol the authors recommend to perform a first trial of ROI functions on the prepared "Supplementary Data":http://cidtransfer.cid.csic.es/descarga.php?enlace1=d5e1de55b1d9b83b1668fc81e151e2ea ]
==**== Data compression steps using ROI *search
14| Download the ROI package provided as "Supplementary MATLAB functions":http://cidtransfer.cid.csic.es/descarga.php?enlace1=3adcd456c13cef5c017b66269651912c (containing ROIpeaks, ROIplot, MSroiaug and plotprofilestable functions) and save it in a folder.
15| Go to ´Set path´ panel and add this folder to MATLAB search path.
16| Run the ROIpeaks function [mzroi, MSroi, roicell]= ROIpeaks (peaks, snthresh, mzerror, minroi, nrows, time) in the ´Command Window´ panel in MATLAB to search ROIs in the first sample.
ROIpeaks function allows building an MS data matrix from variable peaks by selecting only the regions of interest. The implementation of this function requires the input of two variables containing information of the sample, peaks and time, together with the following parameters: snthresh (chromatographic signal-to-noise threshold, commonly between 0.1-1% maximum MS intensity, used to filter significative MS intensities), mzerror (admissible mass deviation, typically set to a generous multiple of the mass accuracy of the mass spectrometer, e.g., 0.05 Da/e), minroi (minimum number of retention times to be considered in a ROI, normally between 5 and 12 seconds in UHPLC systems and between 20 and 50 seconds in HPLC systems) and nrows (number of cells/rows/spectra of the variable peaks desired to be processed). The output parameters of ROIpeaks function are MSroi (newly arranged matrix of dimensions (num.of.scans (m) x nROI), containing the MS spectra of every scan in its rows, and the chromatograms of every ROI in its columns), mzroi (vector containing final m/z values of all ROIs, calculated as the mean of all m/z classified within the same ROI), and roicell (cell array {nROI x 5}, containing nROI x 5 cells, providing information of m/z values (1), retention times (2), intensities (3), scan numbers (4) and mean m/z values of ROIs (5)).
When the process is finished a message indicating final number of ROIs and elapsed time will be displayed on the ‘Command Window’ screen. Variables MSroi, mzroi and roicell will appear in the workspace and two plots, one displaying MSroi respect to time and the other displaying the sum of MSroi respect to mzroi values will be automatically generated (see Figure 4 and "Supplementary Results 1":http://cidtransfer.cid.csic.es/descarga.php?enlace1=42939f3699604260e6cb0eac82b3a69a).
? TROUBLESHOOTING
17| Run the function ROIplot (roicell(n)) in the ‘Command Window’.
ROIplot function allows the evaluation of the ROI previously obtained, to avoid having multiple or halving peaks. The input variable of this function is the previously obtained roicell and the graphical output representations correspond to the chromatographic shapes of the obtained ROIs as well as the distribution of the distinct m/z values defining the same ROI (see Figure 5, where these plots are shown for a particular ROI). In this function, n specifies the particular ROI for which the results are shown. If no n is specified, results will be shown for all ROI values.
? TROUBLESHOOTING
∆ CRITICAL STEP Selecting the correct values for parameters snthresh, mzerror and minroi determines the outcome of the ROI search. Different values of parameters should be tested to see whether the elution profiles of the obtained ROI are meaningful or not. In the case of uncertainties, consult a mass spectrometry expert to avoid misinterpretation of the results.
18| Modify the values of input parameters, if necessary, and repeat the ROI search described in Step 16 using the new values. Repeat this step the number of times required to obtain ROIs that fit original MS data.
19| (Optional) Change the name of the output variables in the workspace by right-clicking on them and selecting ´rename´ in the opening context-sensitive menu, to a name which makes reference to the sample group and number of replicate (i.e., MSroiC1 indicating that this variable corresponds to compressed data of the first replicate of a control sample).
20| (Optional) Save all the variables generated in the workspace, using ‘Save workspace’ button. Suggestions for filename and folder are prefilled in the opening save dialog boxes, but they can be changed. It is highly recommendable to select a name indicating the sample and the type of ROI information that it contains (e.g., ROIC1, indicating that the .mat file provides information of individual ROI search of Control 1 sample).
∆ CRITICAL STEP Only alphanumeric filenames (i.e., only unaccented Latin letters and numbers and underscore are allowed; special characters are not accepted). It is also important to have filenames that are representative for the sample.
21| (Optional) Save also the generated plots using their respective ´File/Save as…´ buttons, located above of each plot. A save dialog opens, with prefilled values for filename, format and location, which can be changed.
? TROUBLESHOOTING
22| Close figure windows individually.
! CAUTION Unsaved plots cannot be recovered after closing their respective windows.
23| Type ´clear all´at the MATLAB Command Window prompt to clear the MATLAB workspace and memory from all variables.
! CAUTION Unsaved data cannot be recovered after this step.
24| Type ´clc´ at the MATLAB Command Window prompt to clear the Command Window.
25| For data conversion and import of a new sample return to Step 1. For data compression of a new sample return to Step 16.
==**== Steps to generate augmented data *matrices
26| Navigate to the folder containing the .mat files generated in the ROI search of individual data matrices (Step 16), using the ´Current Folder´ panel in MATLAB.
∆ CRITICAL STEP Search of ROI among samples and generation of augmented data matrices is only possible when previous ROI search of individual data matrices has been performed.
27| Double-click on two .mat files of two distinct samples (e.g., ROIC1.mat and ROIC2.mat) to load them into MATLAB workspace. The loaded .mat files contain the variables MSroiC1, MSroiC2, mzroiC1, mzroiC2, Time1 and Time2 (see "Supplementary Results 1":http://cidtransfer.cid.csic.es/descarga.php?enlace1=806edb3f3ace424a596e773bcdd5c734) necessary for the ROI search among the two samples.
? TROUBLESHOOTING
28| Run the command [Msroiaug, mzroiaug, timeaug]= Msroiaug (MsroiC1, MsroiC2, mzroiC1, mzroiC2, mzerror, thresh, TimeC1, TimeC2) in the ´Command Window´ panel in MATLAB. A pairwise search of ROI among samples Control 1 and Control 2 is being performed, evaluating common and uncommon ROI values and finally considering both of them. At the end of this search, three new variables are generated in the workspace: MSroiaug, mzroiaug and timeaug and the same plots described in Step 16 are again generated (see "Supplementary Results 2":http://cidtransfer.cid.csic.es/descarga.php?enlace1=806edb3f3ace424a596e773bcdd5c734). In this search, the parameter mzerror is used to define the admissible mass difference between two mzroi values to be considered the same (± mzerror/2).
? TROUBLESHOOTING
! CAUTION The two input MSroi matrices must have the same rt-mode dimensions to enable the search.
29| (Optional) Change the name of the output variables in the workspace by right-clicking on them and selecting ´rename´ in the opening context-sensitive menu, to a name which makes reference to the sample group and number of replicate (e.g., MSroiaugC1C2 indicating that the ROI search has been conducted among Control 1 and Control 2 samples).
30| (Optional) Save all the variables generated in the workspace, using ‘Save workspace’ button. Suggestions for filename and folder are prefilled in the opening save dialog boxes, but they can be changed. It is highly recommendable to select a name indicating the sample and the type of ROI information that it contains (e.g., ROIC1C2.mat , indicating that the .mat file contains information of ROI search among Control 1 and Control 2 samples).
31| (Optional) Save also the generated plots using their respective ´File/Save as…´ buttons, located above of each plot. A save dialog opens, with prefilled values for filename, format and location, which can be changed.
? TROUBLESHOOTING
32| Close figure windows individually.
! CAUTION Unsaved plots cannot be recovered after closing their respective windows.
33| (Optional) Remove all variables containing information of ROI search of individual data matrices in the workspace (e.g., MsroiC1 , MsroiC2 and so on) by right-clicking on the file and selecting ´delete´ in the open context-sensitive menu.
34| Load the .mat file containing information of the individual ROI search of a third sample classified as a control (e.g., ROIC3.mat) by double-clicking on it.
35| Run the command [Msroiaug, mzroiaug, timeaug]= MSroiaug ( MSroiaugC1C2, MSroiC3, mzroiaugC1C2, mzroiC3, mzerror, thresh, timeaugC1C2, timeC3)´ in the ´Command Window´ panel in MATLAB. A pairwise search of ROI among the previous generated MSroiaugC1C2 matrix and the new MSroiC3 matrix is being performed. At the end of this search, three new variables are generated in the workspace: MSroiaug , mzroiaug and timeaug and the same plots described in Step 16 are again generated but for the augmented case (see Figure 6a).
? TROUBLESHOOTING
36| (Optional) Change the name of the output variables in the workspace by right-clicking on them and selecting ´rename´ in the opening context-sensitive menu, to a name which makes reference to the sample group and number of replicate (e.g., MSroiaugC1C2C3 indicating ROI search has been conducted among Control 1, Control 2 and Control 3 samples).
37| (Optional) Save all the variables generated in the workspace, using ‘Save workspace’ button. Suggestions for filename and folder are prefilled in the opening save dialog boxes, but they can be changed. It is highly recommendable to select a name indicating the sample and the type of ROI information that it contains (e.g., ROIC1C2C3.mat, indicating that the .mat file contains information of ROI search among Control 1, Control 2 and Control 3 samples).
38| (Optional) Save also the generated plots using their respective ´File/Save as…´ buttons, located above of each plot. A save dialog opens, with prefilled values for filename, format and location, which can be changed.
? TROUBLESHOOTING
39| Close figure windows individually.
! CAUTION Unsaved plots cannot be recovered after closing their respective windows.
40| Type ´clear all´at the MATLAB Command Window prompt to clear the MATLAB workspace and memory from all variables.
! CAUTION Unsaved data cannot be recovered after this step.
41| Type ´clc´ at the MATLAB Command Window prompt to clear the Command Window.
42| Repeat Steps 26 to 41 to find ROI values among other samples classified as another group (e.g., samples TBT1 , TBT2 and TBT3 ) to obtain information of common and uncommon ROI of the three stressed samples (e.g., ROIT1T2T3). The plots obtained will be analogue to the ones represented in Figure 6 but for the TBT-exposed samples in this case.
43| Repeat Steps 33 to 39 with ROI values obtained independently for controls and stressed samples (e.g., ROIC1C2C3 and ROIT1T2T3) to find ROI values among the two groups of samples. Final obtained MSroiaug matrix (MSroiaugC1C2C3T1T2T3) is the column-wise compressed data matrix ready for the MCR-ALS analysis. The graphical outputs of the ROI search among the six samples are represented in Figure 6b.
44| Clear all variables individually in the workspace, by right-clicking on the file and selecting ´delete´ in the open context-sensitive menu, except final MSroiaugC1C2C3T1T2T3 matrix and vectors timeaugC1C2C3T1T2T3 and mzroiaugC1C2C3T1T2T3, which should be saved.
==**== Data analysis steps for MCR-ALS *method
45| Download the freely available "MCR-ALS GUI 2.0":http://www.mcrals.info and save it in a folder. In this web page information of MCR-ALS code, related tutorials and data sets for practicing can be found.
! CAUTION Although distinct programs can be downloaded from this webpage (MCR-ALS GUI 2.0, MCR-ALS Toolbox 1.0, MCR-ALS command line, MCR-ALS GUI and MCR-Bands), the newest version (MCR-ALS GUI 2.0) is the one used in this protocol.
! CAUTION For requirements regarding software description together with information of new features and applications of the latest version, please refer to another study9.
46| Go to ´Set path´ panel and add this folder to MATLAB search path.
47| Type ´mcr_main´ at the MATLAB Command Window prompt to call the necessary auxiliary routines for the MCR-ALS analysis. The main window of MCR-ALS Toolbox is launched immediately (see Figure 7).
48| Select the data for MCR-ALS analysis by clicking on the ´Select a data matrix´ drop-down button (e.g., MSroiaugC1C2C3T1T2T3 , provided in the "Supplementary Results 2":http://cidtransfer.cid.csic.es/descarga.php?enlace1=806edb3f3ace424a596e773bcdd5c734). A new variable named ´mcr_str´ is generated in the workspace.
? TROUBLESHOOTING
49| Select the number of components of the initial estimation by clicking one of these buttons: ´Manual´ or ´SVD´. ´Manual´ button is used when prior knowledge about the correct number of components is available and ´SVD´ button is used when this estimate is performed considering the number of largest singular values obtained by the Singular Value Decomposition algorithm. In this case, the more appropriate option is the initial estimation through ´SVD´.
50| Click in ´SVD´ button and select the number of components following one of these two options. The first is to use the drop-down menu of Eigenvalues, listed in ascending order of component number (lower Eigenvalue for higher component number). The text box below automatically updates to show the selected number of components in red. The second option is to type the number of components into the text box with the same name and hit enter. The drop-down menu above automatically updates to show the corresponding singular value.
! CAUTION When having data matrices with one of the dimensions large (˃ 10000 elements), calculation of only few singular values is recommended to avoid computer memory problems.
(Optional) For a proper choice of the number of components you can zoom in the ´EigenValues´ Representation and inspect when the rate of the decline between two consecutive values is much lower than for the previous pair of smaller eigenvalues.
After selecting the number of components, the ´EigenValues´ representation remains unchanged but the ´EigenVectors´ representation automatically shows the selected number of components for each of the individual matrices conforming the column-wise augmented data matrix (in this example case, the number of matrices is 6).
∆ CRITICAL STEP Selecting the correct number of components finally determines the outcome of the analysis. Distinct numbers of components should be tested and the results should be evaluated to see which gives the best result in terms of data fitting and chemistry and biology.
! CAUTION In an MCR-ALS analysis, adding a new component is not an additive process. In other words, it does not leave the original components intact, but it recalculates all components (see INTRODUCTION).
51| (Optional) Copy the box showing the number of components selected in the initial estimation by clicking the button ´Copy´.
52| Click ´OK´ button to return to the main screen of MCR-ALS program.
53| Start the initial estimation of one of the two factor matrices (C for concentrations or ST for spectra) by selecting one of these three options: ´Manual´, if they are already available, ´Pure´ for determining initial estimates either of C or ST by means of a purest variable detection method, or “EFA” by means of Evolving Factor Analysis10, only suitable for the case of analyzing evolving processes. In this example, pure estimates will be used, which is calculated using a purest variable selection method (like in the SIMPLISMA method11).
54| Click in ´Pure´ button and select the direction of the variable selection (either concentrations or spectra) by using the drop-down menu of the ´Pure variable detection method´ box.
55| (Optional) Change the noise allowed (in percentage) for the calculation of initial estimates in the text box labeled ´Noise allowed (%)´ and hit enter. Although the default value of 1% is generally safe, different values can be tested and their effect evaluated in the ´Pure Spectra Estimation (Initial Values)´ plot. In this example, 10% of noise will be used to avoid selection of noisy variables.
56| Click ´Do´ button and examine the obtained ´Purest variables´ representation to see whether chromatographic/spectra profiles are reasonable or not (e.g., whether they contain only noise or they are very similar to each other (can indicate that too many components were selected), whether they show every band in the spectra with equal weight (can indicate too few components selected), or whether they contain artifacts (can indicate improper pre-processing)).
The list of purest variables is immediately shown in a box emplaced in the left.
∆ CRITICAL STEP It is important to see whether the pure spectral estimates are meaningful or not, as this can help in selecting the correct number of components. If the addition of a new component (Step 50) does not result in a significantly different new spectral estimate, it is likely that the new component is not required and will not be well resolved.
57| Click ´OK´ button to return to the main screen of MCR-ALS program.
58| Initiate the optimization process by clicking ´Continue´ button, at the bottom of the main interface box. A summary screen in which the top plots represent the row and column profiles of the experimental data, the middle plots show the initial estimate and the C and ST profiles obtained by a least-squares step and the bottom plots represent the score and loading plots obtained by PCA of the analyzed data matrix D with the previously selected number of components will appear (see Figure 8).
59| Modify the number of matrices simultaneously analyzed by writing the number in a text box above the plots. In this example, this number is “6”.
! CAUTION The default value for the number of matrices is “1” since default conditions are established for a single data matrix analysis.
60| Click ´Continue´ button to proceed with the definition of the data set.
61| In the ´Definition of the data set´ window, define the type of multiset data structure by selecting the correct option in the drop-down menu: column-wise augmented data matrix (C direction), row-wise augmented data matrix (S direction) or column- and row-wise augmented data matrix (C & S directions). In this example, the ´column-wise augmented data matrix´ is selected, with 6 submatrices all having the same number of rows (see Figure 9).
62| Click ´OK´ button to proceed with the selection of constraints for ALS optimization.
In this new version of the interface, there are two differentiated screens for the choice of constraints, one for the profiles linked to the row mode (i.e. concentration profiles, C matrix) and another for the profiles related to the column mode (e.g.., spectral profiles, ST matrix).
63| In the ´Constraints: row mode (concentrations and multiple experiments)´ window indicate whether the same constraints will be applied to all C submatrices or not (see Figure 10a).
At the top of the screen, a panel regarding the multiset data structure is presented. It contains the total number of C submatrices included in the augmented data set, an option to apply the same constraints to all C submatrices, or the possibility to change the constraints according to the different C submatrices. Finally, at the right corner, the possibility to apply the constraint of correspondence among species by selecting which components are present in every considered C submatrix is offered. In this case, the same constraints will be applied to all C submatrices.
! CAUTION In the selection of row constraints for augmented data matrices is not allowed the possibility to deal with multiple and different constraints for every analyzed C submatrix.
64| Select the constraints among the four common options (non-negativity, unimodality, closure and equality constraints) and more advanced constraints (such as correlation or kinetic hard-modeling). In the present example, only non-negativity constraints are applied when selecting the option ´forced to zero´ in the drop-down menu.
∆ CRITICAL STEP The implementation of non-negativity constraints through the ´forced to zero´ option is recommended to speed up the calculation.
65| Click ´Continue´ button to proceed with the selection of constraints of ST matrix.
66| In the ´Constraints: column mode (spectra and single technique)´ window select the constraints for ST matrix among the four common options: non-negativity, unimodality, closure and equality constraints (see Figure 10b). In this example, non-negativity constraints through ´forced to zero´ option are implemented.
67| Click ´Continue´ button.
! CAUTION When no closure is selected (e.g., no mass balance in concentrations) constraints, a new window appears to offer the possibility of normalizing the resolved spectra profiles (e.g., normalizing them to have equal height, total sum norm or Euclidean norm) prior to starting ALS optimization. This is recommended to avoid scale instabilities during the evolution of the ALS optimization and it fixes the possible intensity ambiguities. In this example, ´spectra equal height´ was selected.
68| Select general optimization parameters (e.g., the number of iterations or convergence criterion) and the name of output variables in the ´Parameters/Output of ALS optimization´ screen (see Figure 11). In this case, a total of 50 iterations are selected (default value) and the convergence criterion is set to 1%.
69| Select the box to enable the graphical output of the results and click ´Continue´ button. Suggestions for a variable name for concentrations and spectra matrices resulting from MCR-ALS analysis are copt and sopt, respectively.
70| Evaluate the results shown in ´ALS optimization´ screen including information about the convergence, lack of fit and explained variance (see Figure 12).
71| (Optional) Click ´Information´ button to obtain more detailed information about the evolution of the ALS optimization (e.g., plots of explained variance, lack of fit, logarithm of the sum of squares residuals and evolution of concentration/spectra profiles).
72| (Optional) Save all the variables generated in the workspace (see "Supplementary Results 3":http://cidtransfer.cid.csic.es/descarga.php?enlace1=806edb3f3ace424a596e773bcdd5c734), using ‘Save Workspace’ button. Suggestions for filename and folder are prefilled in the opening save dialog boxes, but they can be changed.
73| (Optional) Save also the generated plots using their respective ´File/Save as…´ buttons, located above of each plot. A save dialog opens, with prefilled values for filename, format and location, which can be changed.
? TROUBLESHOOTING
74| Close figure windows individually.
! CAUTION Unsaved plots cannot be recovered after closing their respective windows.
75| Clear all MATLAB variables in the workspace, by right-clicking on the file and selecting ´delete´ in the open context-sensitive menu, except from variables MSroiaugC1C2C3T1T2T3 , timeaugC1C2C3T1T2T3 , copt , sopt and vector mzroiaugC1C2C3T1T2T3 .
! CAUTION Unsaved data cannot be recovered after this step.
76| (Optional) Rename those variables using shorter names (e.g., x , time , c , s and mz instead of MSroiaugC1C2C3T1T2T3 , timeaugC1C2C3T1T2T3 , copt , sopt and vector mzroiaugC1C2C3T1T2T3, respectively).
77| Type ´clc´ at the MATLAB Command Window prompt to clear the Command Window.
==**== Steps to evaluate concentration and spectral profiles of MCR-ALS *components
78| Create two new variables in the workspace named as nexp and ncontrol containing information about the number of experiments and the number of controls of the data sets (in this case, nexp=6 and ncontrol=3) by typing nexp=6 and ncontrol=3 in the ´Command Window´ prompt.
79| Run the command [area, height, table, table2]= plotprofilestable (x, c, s, time, mz, nexp, ncontrol) in the ´Command Window´ panel in MATLAB. Two graphical outputs will be obtained for the first component. In addition, the results of the corresponding statistical evaluation will appear in the MATLAB Command Window followed by the message: “select forward backward plot 1/0”. In order to proceed with the evaluation of next MCR-ALS component introduce “1” in the Command Window, otherwise write “0”.
! CAUTION If Step 76 was skipped, the input variable names of this function must be changed to those used to define the corresponding MATLAB variables.
80| (Optional) Save the two generated figures, resulting from the analysis of the first component (see Figures 13a and 13b), using their respective ´File/Save as…´ buttons, located above of each plot. A save dialog opens, with prefilled values for filename, format and location, which can be changed.
? TROUBLESHOOTING
81| Close figure windows individually.
! CAUTION Unsaved plots cannot be recovered after closing their respective windows.
82| (Optional) Copy the information provided in the ´Command Window´ panel (lof, fit, Rsquare, etc) and paste it in another document to further save it (see Figure 13c).
83| Click to any button to obtain the same plots and results for the next component.
84| Repeat Steps 80 to 83 until the last component.
85| Once obtained the results for all components click once more any key of the computer keyboard. Statistic results when considering all components simultaneously will be presented in the ´Command Window´ panel (see Figure 13d).
86| (Optional) Copy the information provided in the ´Command Window´ panel (lof, fit, Rsquare) and paste it in another document to further save it.
87| Click again any key to obtain in the workspace the two tables containing statistical information (Table and Table2).
88| Click ´Save workspace´ button of the upper panel of MATLAB to save all variables contained in the Workspace. Suggestions for filename and folder are prefilled in the opening save dialog boxes, but they can be changed. It is highly recommendable to select a name indicator of samples and type analysis (e.g., MCR-ALS.mat, indicating that the .mat file contains information of the MCR-ALS analysis.
89| Type ´clear all´at the MATLAB Command Window prompt to clear the MATLAB workspace and memory from all variables.
! CAUTION Unsaved data cannot be recovered after this step.
90| Type ´clc´ at the MATLAB Command Window prompt to clear the Command Window.