## 2 Materials and Methods
### Preprocessing and Feature Extraction  
Preprocessing and feature extraction were carried out through the identification of the number of white pixels by an image segmentation histogram using a binary mask (profile-based image segmentation, algorithm showed in Figure 3) as follows:  
_Size adjustment_: The SDS-PAGE images obtained from the Gel Doc XR+ photo documenter system, were resized to images of 600 by 400 pixels size. Image equalization was performed if the samples in the gels had a high protein concentration. Subsequently, all images were binarized and dilated, as shown in Figure 3. The images were inverted after an erosion operation was applied. _Analysis of lanes and bands_: A binary mask with a dimension of 1 pixel wide (MAXWIDE variable) and 400 pixels high (MAXHIGH variable) was used for the lanes. For the study of the bands present per sample, the value of 1 pixel wide for the MAXWIDE variable was used, assigning 50 pixels for the MAXHIGH variable of the binary mask. The mask was displaced pixel by pixel across the entire image width, that is, 600 data (one for each pixel for lanes) or 400 data (one for each pixel for bands). Figure 2: (**A**) Purification of recombinant GPN protein from _Escherichia coli_ bacteria. Lane 1: Molecular weight control. Lane 2: Positive control of GPN protein expression. Lane 3: Negative expression control. Lane 4: Total protein extract. Lanes 5–9: purified GPN protein. (**B**) Different concentrations of purified GPN protein. (**C**) Different concentrations of BSA protein. _Application of the binary mask_: The histogram of the image region delimited by the binary mask was calculated. Since the bands in this process are white, the value corresponding to the number of white pixels in the histogram of the binarized image (position 255 of the histogram) was used and stored in an array. The array data were plotted and called the \"new image profile\". _Interpretation of the \"new image profile\"_: For the analysis of the full SDS-PAGE image, the multiple minimum values present in the new image profile are related to the separation between every lane of the gel image. In this region, the number of white pixel values in the array obtained decreases, which helps find the number of lanes in the image. On the other hand, when the analysis was performed for each lane, the multiple maximum values of the new profile of the image were related to the position of the proteins, as they are represented  
Figure 3: Preprocessing and feature extraction to analyze the complete gel image. in white. Places of maximum intensity represent the presence of proteins, and places of lower intensity represent the absence of proteins (between two protein separations, the average was calculated to obtain a single maximum), as shown in Figure 3.  
This procedure uses several parameters. Nonetheless, more of them are set in the program and worked well for most of the experiments carried out in this research. The value of the structuring element for erosion and dilation was 25 for lanes and 3 for bands, which allowed the detection of the total number of samples and bands per protein per sample present in an SDS-PAGE gel. The threshold values for the segmentation operation were calculated using the OTSU method. The program was developed in Python with the Pytorch framework, OpenCV to evaluate the images and histograms, and numpy with matplotlib to calculate the graphs. Figure 3 presents an overall summary of the preprocessing and feature extraction. The pseudocode is shown in Algorithm 1.