Developing a novel paper-based enzymatic biosensor assisted by digital image processing and first-order multivariate calibration for rapid determination of nitrate in food samples

For the first time, a novel analytical method based on a paper based enzymatic biosensor assisted by digital image processing and first-order multivariate calibration has been reported for rapid determination of nitrate in food samples. The platform of the biosensor includes a piece of Whatman filter paper impregnated with Griess reagent (3-nitroaniline, 1-naphthylamine and hydrochloric acid) and nitrate reductase. After dropping a distinct volume of nitrate solution onto the biosensor surface, nitrate reductase selectively reduces nitrate to nitrite and then the Griess reagent selectively reacts with nitrite to produce a red colored azo dye. Therefore, the color intensity of the produced azo dye is correlated with nitrate concentration. After image capture, the images were processed and digitized in the MATLAB environment by the use of an image processing toolbox and the vectors produced by the digital image processing step were used as inputs of the first-order multivariate calibration algorithms. Several multivariate calibration algorithms and pre-processing techniques have been used to build multivariate calibration models for verifying which technique offers the best predictions towards nitrate concentrations in synthetic samples and the best algorithm has been chosen for nitrate determination in potato, onion, carrot, cabbage and lettuce samples as real cases.


Introduction
Nitrate is a polyatomic ion which is mainly used as a fertilizer in agriculture. 1 Nitrate toxicosis occurs by enterohepatic metabolism of nitrate to nitrite and nitrite can oxidize Fe 2+ to Fe 3+ in hemoglobin which is then unable to carry oxygen. 2 This process can cause lack of oxygen in organs and a dangerous condition called methemoglobinemia occurs. In infants, nitrate metabolizing triglycerides are present at higher concentrations relative to other stages of development; therefore, they are especially vulnerable to methemoglobinemia. It should be noted that the acceptable daily intake for nitrate ions has been recommended in the range of 0-3.7 mg (kg body weight) À1 day À1 by the Food and Drug Administration/World Health Organization (FDA/ WHO). 3 Therefore, development of sensitive analytical methods for nitrate determination is important for controlling the quality of foods.
Some analytical methods have been developed for determination of nitrate such as high-performance liquid chromatography (HPLC/UV), 4 spectrophotometry, 5 electrophoresis, 6 gas chromatography-mass spectroscopy (GC-MS), liquid chromatography (LC), 7 photometrical method, 8 potentiometric sensor, 9 and electrochemical methods. [10][11][12][13][14][15] Most of these techniques are expensive and indirect, handling of them needs highly trained technicians and sophisticated instruments. Therefore, developing novel and simple analytical methods which are sensitive, selective, and low cost for nitrate determination is needed.
Chemometrics has obtained widespread applications over the recent decades because of the need to studying complex samples by improving the existing analytical methods. According to the IUPAC denition, calibration is an operation by which an output quantity is related to an input quantity and also called univariate calibration. The input quantities are the concentrations of the analyte of interest and the output quantities are the responses of an analytical instrument. The multivariate calibration methods are widely used to extract information from different types of analytical data to predict the concentrations of the analyte of interest.
Recently, paper based biosensors (PBBs) have received a lot of attention because they are simple, low cost, sensitive, selective and need minimal use of supporting equipment, small volumes of sample, and no external power source since uidic movement is controlled by capillarity. Therefore, these advantages motivated us to develop a novel enzymatic PBB for determination of nitrate in food samples. Nitrate reductase is a molybdoenzyme which can selectively reduce nitrate to nitrite. 16 Griess reagent which includes 3-nitroaniline, 1naphthylamine and hydrochloric acid can selectively react with nitrite to produce a red colored azo dye. 17 Therefore, in the presence of nitrate reductase and Griess reagent, nitrate is reduced to nitrite and subsequently nitrite can react with Griess reagent to produce a red colored azo dye and the color intensity is proportional to nitrate concentration. In other words, the color change produced at the biosensor surface due to contact with nitrate can be detected and calibrated with nitrate concentration to build a calibration curve which can be used to predict nitrate concentration in unknown samples. Since detecting the color change with the naked eye is difficult, simple systems like digital cameras can be used. In PBB, concentration and some factors such as pH and light can inuence the color intensity therefore, multivariate calibration can be a good choice to overcome the mentioned multivariate problem. In the recent years, multivariate calibration methods applied to different types of data are gaining widespread attention for the analysis of complex mixtures. [18][19][20][21][22][23][24] Multivariate calibration techniques which make a relationship between the concentrations of various analytes and multiple measured responses have the advantage of using the full information and not only a characteristic value. Moreover, they allow us a fast determination of components with no prior separation.
In this work, we developed a novel analytical methodology for nitrate determination based on an enzymatic PBB assisted by digital image processing and rst-order multivariate calibration. Aer capturing the images, they will be processed in MATLAB environment to prepare the inputs of multivariate algorithms and then several multivariate calibration models will be constructed with the help of several algorithms to identify which one offers the best predictions. Finally, the best multivariate calibration model will be applied to determination of nitrate in food samples. Schematic representation of the proposed methodology employed to determination of nitrate in food samples is shown in Scheme 1.

Chemicals and solutions
All the chemicals used in this study were of analytical reagent grade from regular sources and doubly distilled water (DDW) was used to prepare all the solutions. Sodium nitrate, sodium hydroxide, hydrochloric acid and ethanol were supplied by Merck. Nitrate reductase, 3-nitroaniline and 1-naphthylamine were purchased from Sigma. A stock 0.1 M solution of sodium nitrate was prepared by exact weighing and dissolution of its solid powder in DDW and nitrate working solutions were prepared by diluting the stock solution to appropriate volumes. The Griess reagent including 3-nitroaniline (2.5 Â 10 À3 M), 1naphthylamine (2.5 Â 10 À2 M) and hydrochloric acid (1.5 Â 10 À4 M) was prepared in DDW/ethanol mixture (50 : 50, v/v%).

Image capturing system
The image capturing system consists of a smartphone (SONY XPERIA Z5 equipped with a camera (23 MP)), a sample holder to embed the biosensor just under the camera of the smartphone and three LED lamps which provide enough light for sample holder medium.

Fabrication of the enzymatic PBB
Rectangular pieces of the Whatman lter paper were cut to prepare the platform of the biosensor. Then, the papers were immersed into the Griess reagent including 3-nitroaniline (2.5 Â 10 À3 M), 1-naphthylamine (2.5 Â 10 À2 M) and hydrochloric acid (1.5 Â 10 À4 M) prepared in DDW/ethanol mixture (50 : 50, v/v%) and allowed to be dried at room temperature. Finally, nitrate reductase with a concentration of 10 U mL À1 was micropipetted onto the sensor surface.

Preparation of real samples
To extract nitrate from potato, onion, carrot, cabbage and lettuce samples, certain amounts of crushed samples were le in 150 mL deionized water at 70 C under stirring for 10 min and then, the remained liquids were ltered. 25 For nitrate determination in real samples by the proposed methodology in this work, distinct volumes (100 mL) of the solution prepared from real samples were dropped on the PBBs and then their images were captured. To verify the performance of the developed methodology towards nitrate determination in real samples, the real samples were also analyzed by HPLC (KNA-UER) with an ODS column (length 250 mm, internal diameter 4.6 mm and particle diameter 5 mm) and a UV detector.

Mathematical analysis of data
Since several variables such as heterogeneity in the Griess reagent or nitrate reductase deposition on the biosensor surface, and variation in light sources other than nitrate concentration can affect the color intensity and may vary image to image therefore, multivariate calibration is necessary to model their contributions in signal acquisition. Before dropping nitrate solution onto the biosensor surface, we captured an image from its surface to prepare a blank which could be used to correct the color intensity of the images of the samples by subtracting its matrix from the matrices of them. Aer capturing the images, they were transferred into MATLAB environment to obtain their arrays which could be further processed by the existing commands. Each image in command window is a 2160 Â 3840 Â 3 array which contains three matrices with size 2160 Â 3840 related to red (R), green (G) and blue (B) color intensities, respectively. The array of blank was subtracted from the array of each sample for background elimination by which corrected arrays will be obtained. Then, a matrix with size 2160 Â 3840 related to the intensity of red color of each corrected array was extracted and converted to a vector (size 1 Â 3840) and subsequently normalized by the use of existing commands. Finally, the normalized vectors obtained from the images were used as inputs of the rst-order multivariate algorithms. Partial least squares-1 (PLS-1) and its preprocessing methods such as auto-scaling (ASC) and mean centering (MC) were performed using PLS-Toolbox (Version 3.5, Eigenvector Research Inc., USA, 26 ). Computations based on continuum power regression (CPR), robust median centering (RMC), robust L1-median centering (RLMC), partial robust M-regression (PRM), and robust continuum regression (RCR) were performed in MATLAB environment. 27,28 Computations based on successive projection algorithm (SPA) and multiple linear regression (MLR) were performed in MATLAB environment. 29 All the computations related to digital image processing and rst-order multivariate calibration have been performed in MATLAB environment, Version 7.5.

Model optimization
To compare multivariate calibration models, the efficiency of the best possible model must be found. Because of a highly correlation between the calibration model efficiency and its parameters, the following parameters must be optimized: PLS-1: number of latent variables (LVs). CPR: number of LVs, and power parameter (PP).
PRM: number of LVs, and percentage of data contamination (PDC).
RCR: number of LVs, PDC, PDC and delta parameter (d). MLR: number of LVs.

Model efficiency estimation
To verify a model is able to the analysis of real samples or not, validation of the model is an important step in multivariate calibration model building. To achieve this goal, each model was validated for prediction of the concentrations of the validation set by evaluating root mean squared errors of crossvalidation (RMSECV), relative error of prediction (REP), root mean square errors of prediction (RMSEP), and cross-validated correlation coefficient (Q 2 ).
Scheme 1 Schematic representation of the proposed methodology employed to determination of nitrate in food samples.
This journal is © The Royal Society of Chemistry 2018 REPð%Þ ¼ 100 where y act and y pred are actual and predicted concentrations, respectively, and y mean is the mean of the actual concentrations.
m and n are the number of samples in calibration and validation sets, respectively. R 2 is another criterion which could be dened as: where SSR and SSY are the sum of squares of the residual and the sum of squares, respectively.
Scheme 2 The proposed mechanism for biosensing of nitrate by the developed biosensor in this study.   Results and discussion

Principles of nitrate biosensing
The platform of the biosensor includes a piece of Whatman lter paper impregnated with Griess reagent (3-nitroaniline, 1naphthylamine and hydrochloric acid) and nitrate reductase. Aer dropping a distinct volume (100 mL) of nitrate solution onto the biosensor surface, nitrate reductase selectively reduces nitrate to nitrite and then the Griess reagent selectively reacts with nitrite to produce a red colored azo dye (see Scheme 2). Therefore, the color intensity of the produced azo dye is correlated with nitrate concentration.

Calibration set
To develop a calibration set, we prepared eight PBBs and aer dropping nitrate solutions with concentrations in the range of 1.00 Â 10 À9 -1.00 Â 10 À2 M onto them and waiting for 20 minutes, their images were captured. Fig. 1A-H shows the biosensors in contact with nitrate solutions with different concentrations ranging in 1.00 Â 10 À9 -1.00 Â 10 À2 M. As can be seen, the color intensity is decreasing with decrease in nitrate concentration. Fig. 2A-H shows the images captured from the surface of the biosensors shown in Fig. 1A-H. In order to correct the color intensities produced by different biosensors, we prepared a PBB without contacting with nitrate solution (Fig. 1I) and then, its image was captured as shown in Fig. 2I. The color intensity of the biosensor shown in Fig. 1I has been subtracted from the color intensity of the all biosensors in contact with nitrate solutions.

Validation set
To evaluate the performance of the developed multivariate calibration models it is necessary to prepare a validation set containing nitrate in the same concentration range used for   Applications of the rst-order multivariate calibration algorithms to develop multivariate calibration models PLS-1. The PLS is a famous rst-order multivariate calibration methodology which has been frequently applied to different kind of instrumental data with acceptable results. 30,31 In PLS-1 version, all model parameters will be optimized for quantication of one constituent at a time. In model-training step, an iterative algorithm decomposes the calibration data to correlate the data with concentrations using a so-called inverse model. 32 This step provides a series of loadings (p, size J Â A, J is the number of sensors and A is the number of LVs), weight-loadings (W, size J Â A) and regression coefficients which could be applied to a new sample (v, size A Â 1). Given the prole of an unknown sample x u (size J Â 1), the test sample scores (t u , for more than one LV, t u is a vector) will be obtained by projection of x u onto the space of the loadings and weightloadings: Then, the concentration (y u ) of the analyte in the unknown sample will be estimated by multiplication of t u and the regression coefficients: The inputs of PLS-1 were prepared according to the procedure described in Section 2.5. Before calibration, in order to avoid overtting, the optimum number of LVs were assessed by applying leave one out cross-validation (LOO-CV) method. 31 Preprocessing methods such as ASC and MC were applied to preprocess the data. The gures of merit obtained for PLS-1, ASC-PLS-1 and MC-PLS-1 are presented in Table 1. As can be seen, by applying preprocessing methods some superiorities can be observed but all the three models didn't show acceptable predictive ability and cannot be recommended for the analysis of real samples.
CPR. No mathematical details of CPR will be described here, for a detailed description of theoretical aspects of CPR, see ref. 33 The MC and ASC were used as preprocessing method, LOO-CV was used for determination of the number of LVs and power parameter was also optimized. The results of application of CPR to validation set are presented in Table 1. According to the values of RMSECV, REP, R 2 , RMSEP and Q 2 it can be concluded that CPR is pretty better than PLS-1 but could not be recommended for the analysis of real samples.
PRM and RCR. Classical multivariate algorithms are extremely sensitive to the existence of outliers and their performance can decrease in the presence of outliers therefore, the presence of outliers in data used for constructing multivariate calibration models was checked by robust principal component analysis (rPCA). 34 Here, using robust and robust orthogonal distances a distance-distance plot (not shown) was made which could be used to identify the outliers. For the ith sample, the robust distance, RD i , is dened according to the following equation: where the elements of the robust score matrix are collected in t R ij and S R j refers to squared root of the jth robust eigenvalue. The orthogonal distances could be obtained by the following equation: where t i,f is the ith score vector containing f elements and P f is a matrix (n,f) including f robust loadings. For detecting outlying observation z-transformed distances can be used, i.e., to center all the vectors with distances around the median and to divide all elements by corresponding Q n -scale of the distances. 35 A general cutoff value of 3 was used for z-transformed distances which considers all the objects with z-transformed distances higher than 3 as outliers (here, one outlier was detected). The presence of the outliers in data used for model building may disrupted the performance of PLS-1 and CPR. Therefore, RCR and PRM as robust algorithms which within an outlier-free subset of the data, 36,37 were used for predicting concentrations of nitrate in the validation set. RMC and RLMC were used to pre-process the data and determination of the number of LVs was performed by LOO-CV. Maximum percentage of data contamination was xed at 10. Results of application of RCR and PRM to validation set are presented in Table 1. As can be seen, obvious improvement is notable in the results especially for PRM with RLMC as preprocessing technique. Using a subset of data free from the outlier is a great help for PRM to predict nitrate concentrations in good accordance with nominal ones. But, to make a nal decision about choosing the best algorithm for the analysis of real samples, the results of MLR-SPA must also be checked.
MLR-SPA. The MLR is the simplest technique for building a calibration model. 38,39 The collinearity problems could be tackled by SPA as a variable selection technique. 40 The SPA can also provide simpler models and better predictions. For this purpose, variable selection was performed by SPA for obtain a simpler MLR model. The results of application of MLR-SPA to validation samples are presented in Table 1. According to the results presented in Table 1, MLR-SPA showed a very weak performance to predict nitrate concentrations in validation samples and denitely cannot be recommended for the analysis of real samples.

Comparison of rst-order algorithms
In order to compare accuracy and precision of the rst-order multivariate algorithms used in this study, the predicted concentrations related to the validation set were regressed on the actual (nominal) ones by the analysis of predicted concentrations versus actual concentrations by ordinary least squares (OLS). 41 Elliptical joint condence region (EJCR) test was used to compare the calculated intercept and slope with their expected values (intercept ¼ 0, slope ¼ 1) which is also called the ideal point. Therefore, if the ellipses obtained by EJCR include the ideal point the predicted and nominal values are not signicantly different. The size of ellipses refers to the precision of the method, smaller sizes conrm higher precisions. 42 Fig. 5A and B show the EJCRs (at 95% condence level) for the slopes and intercepts of the regressions for nitrate concentrations in validation set predicted by different rst-order multivariate calibration models. As can be seen, the best performance (smaller ellipse which contains the ideal point) is observed for application of RLMC-PRM to predict nitrate concentrations in validation relative to the other algorithms. The statistical results presented in Table 1 also support the results of this section.

Analysis of real samples for nitrate determination
Aer preparing the real samples according to the procedure described in section preparation of real samples, the RLMC-PRM model with optimized parameters was used to estimate nitrate concentration in potato, onion, carrot, cabbage and lettuce as real samples. Because of the probable existence of nitrite in real samples and in order to obtain reliable results for nitrate concentration, each sample is analyzed by two PBBs. At rst, a PBB without nitrate reductase (PBB*) is applied and then, an enzymatic PBB which contains nitrate reductase is applied. Aer capturing the images of the mentioned PBBs, the matrix of the PBB* is subtracted from PBB matrix (corrected matrix of real sample ¼ matrix PBB À matrix PBB*). Finally, the corrected matrices of real samples were converted to vectors and were used as inputs of RLMC-PRM for predicting nitrate concentrations. The corrected matrices of real samples are shown by the imshow command in Fig. 6. The results of the analysis of real samples are presented in Table 2. The t-test was used to compare the results of the developed method in this study with those obtained by the reference method (HPLC/UV) and the results are presented in Table 2. Since the experimental values of t are less than their critical value (t ¼ 3.18, p < 0.05) therefore, the null hypothesis is not rejected which conrms that the methods do not give signicantly different results for the nitrate concentration.
When a new analytical method is developed, it is necessary to verify its performance with that of a reference method. Regarding this important step, we expanded our work for comparing its accuracy towards nitrate determination with HPLC/UV as the reference method. Table 2 shows the results obtained by our method and HPLC/UV. The results of the proposed method are comparable with those of HPLC/UV. Therefore, according to the results obtained in this section, the method described in this study is highly recommended for nitrate determination in food samples.

Conclusions
In this study, a novel, sensitive, selective and very low-cost analytical method based on an enzymatic biosensor assisted by digital image processing and rst-order multivariate calibration was introduced for rapid determination of nitrate in food samples. The proposed biosensor signicantly enhances the selectivity towards nitrate ions due to the existence of nitrate reductase and Griess reagent. Aer reduction of nitrate to nitrite by nitrate reductase, the Griess reagent selectively reacts with nitrite to produce a red colored azo dye and its color intensity is correlated with nitrate concentration. Aer image capturing, the images were digitized and processed in MATLAB environment and converted to the vectors by the existing commands. The vectors were used to construct multivariate calibration models. Aer multivariate calibration model development by PLS-1, PRM, CPR, RCR and MLR-SPA their performances towards nitrate determination in synthetic samples were compared and RLMC-PRM was chosen as the best one for the analysis of real samples. Finally, the application of the developed method to assay nitrate concentration in potato, onion, carrot, cabbage and lettuce as real cases allowed us to obtain satisfactory results which were in a good agreement with the HPLC/UV as reference method. This study allowed us to present an analytical method as an efficient, low-cost and accessible alternative for routine determination of nitrate in food samples. Taking into account that applying HPLC/UV to nitrate determination suffers from some problems such as instrumental limitations, cost and time, use of the method described in our study is highly recommended.

Conflicts of interest
There are no conicts to declare.