# Synthetic Data Generation for the Development of 2D Gel Electrophoresis Protein Spot Models
## 2 Materials and Methods
### Generation of Synthetic Protein Spot Images  
#### 2.1.1 Requirements for the Synthetic Protein Spot Data  
The main, challenging goal of generating synthetic data is to create useful synthetic data that reflect the important statistical properties of the underlying real-world data so that the synthetic dataset helps train better machine learning (ML) models. There are requirements for the dataset and evaluation criteria needed to develop a suitable dataset. The requirements for the synthetic dataset arise from the purpose for which the dataset is intended. Thus, the main requirement is that the synthetic dataset must allow the development of an ML model that is well-performing on real data. This is possible to test only once the dataset is created. To speed up the process of developing the data simulation method, additional requirements that frame the early-phase dataset are formulated. Domain knowledge helps to formulate the aforementioned requirements. Domain knowledge helps to identify the generating factors that determine the appearance of the spot. By simulating these factors, it is possible to create a synthetic patch of a 2 DGE image. Thus, the small region of the 2 DGE image, containing a single protein spot, can be decomposed into a pure protein spot without background, non-uniform background (low-frequency noise), and high-frequency noise (Gaussian and impulsive noise). The pure protein spot is the signal we want to measure. Its integrated intensity is correlated with the amount of protein accumulated in the spot's area in the 2 DE gel. Background and some other types of noise appear due to the staining of non-protein substances in the gel. Other sources of noise are dust and imaging conditions. A realistic input image should be simulated, including all the factors that form a real image, but the target image should contain only the protein spot of interest (only the signal, without any noise). Another observation about the appearance of the 2 DGE image is that protein spots typically appear in groups. Clearly, isolated spots are not so common. Thus, secondary spots should be treated as any other noise components. The appearance of the protein spot is typically circularly symmetric if the spot is small. The larger spots tend to possess horizontal symmetry but less vertical symmetry and have longer tails in the upright direction. This asymmetry is caused due to movement of the larger amount of protein from the top towards the bottom in the gel. The spots with large amounts of proteins appear saturated. With these observations, we want to create spots whose horizontal (intensity) sections are smooth. Examples of unwanted artifacts of spot shape construction, as well as the preferred case, are visualized in Figure 2.  
Other requirements for the image patch (technical requirements) are the size of the image and the positioning of the spots in the image. Considering that the dataset is meant to develop a spot reconstruction algorithm, the image patches are selected to be small, and the main spot is centered in the image with slight variations in position. Based on the data flow in the selected ML model (input images are downsampled three times) and the attempt to balance the complexity and capacity of the ML model (in order to represent sufficiently detailed protein spots), the image patch size was set to \(56\times 56\) px. In order to develop protein spot reconstruction algorithms that are capable of reconstructing spots either without background or with remaining background, the dataset has two types or target images: one containing only the main spot (without any noise) and one containing the spot and the constant background (noise). The developed reconstruction algorithm that outputs the main spot with the background noise is used to test it on real 2 DGE images because the true background intensity in the real images is unknown, and we want to measure only the ability of the trained model to replicate the appearance of real spots.