
==== Front
Brief Bioinform
Brief Bioinform
bib
Briefings in Bioinformatics
1467-5463
1477-4054
Oxford University Press

10.1093/bib/bbae463
bbae463
Problem Solving Protocol
AcademicSubjects/SCI01060
PELMI: Realize robust DNA image storage under general errors via parity encoding and local mean iteration
https://orcid.org/0000-0003-1503-6009
Cao Ben School of Computer Science and Technology, Dalian University of Technology, No. 2 Linggong Road, Ganjingzi District, Dalian, Liaoning 116024, China

Wang Kun The Key Laboratory of Advanced Design and Intelligent Computing, Ministry of Education, School of Software Engineering, Dalian University, No. 10 Xuefu Street, Dalian Economic-Technological Development Zone, Dalian, Liaoning 116622, China

Xie Lei The Key Laboratory of Advanced Design and Intelligent Computing, Ministry of Education, School of Software Engineering, Dalian University, No. 10 Xuefu Street, Dalian Economic-Technological Development Zone, Dalian, Liaoning 116622, China

Zhang Jianxia School of Intelligent Engineering, Henan Institute of Technology, No. 90, East Hualan Avenue, Hongqi District, Xinxiang, Henan 451191, China

Zhao Yunzhu The Key Laboratory of Advanced Design and Intelligent Computing, Ministry of Education, School of Software Engineering, Dalian University, No. 10 Xuefu Street, Dalian Economic-Technological Development Zone, Dalian, Liaoning 116622, China

Wang Bin The Key Laboratory of Advanced Design and Intelligent Computing, Ministry of Education, School of Software Engineering, Dalian University, No. 10 Xuefu Street, Dalian Economic-Technological Development Zone, Dalian, Liaoning 116622, China

Zheng Pan Department of Accounting and Information Systems, University of Canterbury, Upper Riccarton, Christchurch 8140, New Zealand

Corresponding author. The Key Laboratory of Advanced Design and Intelligent Computing, Ministry of Education, School of Software Engineering, Dalian University, Dalian, Liaoning 116622, China. E-mail: wangbinpaper@gmail.com
Ben Cao and Kun Wang are joint first authors.

9 2024
17 9 2024
17 9 2024
25 5 bbae46316 5 2024
01 9 2024
04 9 2024
© The Author(s) 2024. Published by Oxford University Press.
2024
https://creativecommons.org/licenses/by-nc/4.0/ This is an Open Access article distributed under the terms of the Creative Commons Attribution Non-Commercial License (https://creativecommons.org/licenses/by-nc/4.0/), which permits non-commercial re-use, distribution, and reproduction in any medium, provided the original work is properly cited. For commercial re-use, please contact journals.permissions@oup.com

Abstract

DNA molecules as storage media are characterized by high encoding density and low energy consumption, making DNA storage a highly promising storage method. However, DNA storage has shortcomings, especially when storing multimedia data, wherein image reconstruction fails when address errors occur, resulting in complete data loss. Therefore, we propose a parity encoding and local mean iteration (PELMI) scheme to achieve robust DNA storage of images. The proposed parity encoding scheme satisfies the common biochemical constraints of DNA sequences and the undesired motif content. It addresses varying pixel weights at different positions for binary data, thus optimizing the utilization of Reed–Solomon error correction. Then, through lost and erroneous sequences, data supplementation and local mean iteration are employed to enhance the robustness. The encoding results show that the undesired motif content is reduced by 23%–50% compared with the representative schemes, which improves the sequence stability. PELMI achieves image reconstruction under general errors (insertion, deletion, substitution) and enhances the DNA sequences quality. Especially under 1% error, compared with other advanced encoding schemes, the peak signal-to-noise ratio and the multiscale structure similarity address metric were increased by 10%–13% and 46.8%–122%, respectively, and the mean squared error decreased by 113%–127%. This demonstrates that the reconstructed images had better clarity, fidelity, and similarity in structure, texture, and detail. In summary, PELMI ensures robustness and stability of image storage in DNA and achieves relatively high-quality image reconstruction under general errors.

DNA storage
DNA encoding
parity encoding
local mean iteration
111 Project 10.13039/501100013314 D23006 National Natural Science Foundation of China 10.13039/501100001809 62272079 Natural Science Foundation of Liaoning Province 10.13039/501100005047 2022-KF-12-14 Postgraduate Education Reform Project of Liaoning Province LNYJG2022493 Dalian Outstanding Young Science and Technology Talent Support Program 2022RJ08 Dalian 2023JJ11CG002
==== Body
pmcIntroduction

The rapid advancement of global digitalization has led to an increasing demand for large-capacity data storage solutions. Traditional storage media suffer from low encoding density and high maintenance costs [1], whereas DNA, due to its high encoding density and stability, has garnered significant attention from researchers [2, 3]. In 2012, Church et al. [4] proposed a binary conversion mechanism that satisfies basic biochemical constraints (GC content i.e. the number of bases G and C as a percentage of the total DNA sequence length and homopolymers). Subsequently, Goldman et al. [5] introduced Huffman encoding, which increases the theoretical encoding rate to 1.58 bits/nt. Unintended changes or modifications that occur during the synthesis, storage, and sequencing of DNA sequences are known as DNA storage errors. To improve the accuracy of DNA storage, Grass et al. [6] introduced Reed–Solomon (RS) error correction in 2015 to correct insertion, deletion, and substitution errors in DNA sequences. In this scheme, data payload (data bits) is mapped using Galois fields, where the last two elements of a single field represent different bases, thus avoiding the occurrence of homopolymers of three or more bases but without effectively restricting GC content. In 2017, Erlich et al. [7] introduced fountain encoding with fault tolerance, which treats synthesized DNA fragments as packets in a data stream, thus achieving efficient DNA data storage. Internally, DNA sequences are protected by RS encoding, which can correct substitution errors. If RS codes detect errors that cannot be corrected (insertion, deletion, or excessive substitution errors), a single fragment is considered for erasure. Erasures can be reconstructed from other fragments using external fountain encoding, thus enhancing the stability and accuracy of DNA storage. In 2022, Wang et al. [8] improved fountain code by replacing address with data blocks to reduce the complexity of random access. Subsequently, DNA-Aeon [9] utilizes fountain codes as an external encoder and takes the undesired motif [2] as the encoding merit of DNA storage, effectively improving the robustness of stored data. DNA sequences consist of primer, address, payload, and error correction code, as shown in Fig. 1. Among them, the primer refers to the locating sequence used to identify and bind the starting position of the required DNA sequence in DNA sequencing. The primary function of the address bit is addressing, which is used to recognize the target DNA sequence during polymerase chain reaction (PCR) and to aid in amplification. The payload carries the stored data, and the error correction section is the error correction redundancy generated by the RS encoding for error correction [10]. When errors occur in the address, it is more likely to lead to DNA sequence addressing failures, which, in turn, affects read/write consistency.

Figure 1 The roles of different positions within the DNA sequences used for DNA storage.

Images are one of the most important types of data presentation, making the storage and utilization of image data particularly important. Therefore, efficiently and reasonably storing image data in DNA has become a research hotspot. Zhu et al. [11] successfully encoded images into 16 DNA carriers using quaternary barcodes, achieving image preservation, encryption, and recovery without any protein or enzyme reactions. This work implemented a pure DNA storage system on a nanopore platform with higher capacity and programmability. To improve the accuracy of DNA image storage, researchers have explored methods for intrinsic error detection and error correction; error detection refers to identifying whether errors have occurred in the DNA sequences, and error correction refers to correcting the errors that have been detected, such as Hamming distance, hidden Markov model (HMM), Bose–Chaudhuri–Hocquenghem codes (BCH codes), Levenshtein distance, and markers (used for identifying and tracking specific data sequences) [12–18]. In 2021, Melpomeni et al. [19] used discrete wavelet transform transformation for image encoding and achieved image reconstruction with a peak signal-to-noise ratio (PSNR) of 14.3 after in vitro storage. To improve the image reconstruction rate, Li et al. [20] proposed a barrier strategy in 2022 aimed at reducing the data offset caused by insertion and deletion errors. Under a 0.5% error rate, the SSIM of the reconstructed image reached 0.5528. Chao et al. [21] achieved image reconstruction using low-density parity-check (LDPC) local protection and automatic color change detection. Under a 0.5% error rate, the SSIM of the reconstructed image reached 0.67. In addition to using traditional image coding and enhancement algorithms, Wu et al. [22] employed convolutional neural networks for the DNA encoding and decoding processes and seamlessly integrated DNA polymerase chain reaction amplification into the network architecture to improve data recovery accuracy. The following year, Zheng et al. [23] proposed the DNA-QLC algorithm, which utilizes the quantized ResNet VAE model for image compression and DNA sequence correction, thereby enhancing the encoding density and error correction capabilities.

The images are composed of a fixed number of pixels, and the size and resolution of images determine the quantity of these pixels. However, during the DNA storage process, insertion and deletion errors, as well as address errors, can directly affect the length of decoded binary data, further influencing the increase or decrease in the number of pixels, ultimately leading to errors in image reconstruction. In handling image data, the existing DNA storage schemes have shortcomings, such as error correction ability of address and encoding quality. Inspired by ideas from mean iteration and rotation encoding [24–29], we propose parity encoding and local mean iteration. Our experimental results show that PELMI reduces the undesired motif content by 23%–50% and achieves image reconstruction with an error rate under 2%. Under the same level of errors, the pixel and structural similarity of the reconstructed images are significantly improved. For instance, under a 1% error rate, the PSNR and multiscale structural similarity index measure (MS-SSIM) are, respectively, enhanced by 10%–13% and 46.8%–122%.

Materials and methods

In this paper, the PELMI storage scheme is proposed to solve the shortcomings of the current DNA storage schemes, which cannot reconstruct the images due to address errors and the insufficient encoding quality of the image sequence. For encoding, we introduce a parity encoding scheme based on the rotational encoding concept, which not only satisfies common biochemical constraints but also effectively restricts the undesired motif content. Considering the different characteristics of address coding and payload coding, the design of address bits prioritizes simplicity and ensures a fixed mapping to the target block. Therefore, in this paper, addresses are generated through parity coding rules to reduce coding complexity and redundancy. To address the low error correction performance utilization of RS encoding in image data, PELMI includes an error protection strategy based on different pixel weights at different positions and includes identifier bits at fixed positions [30–33]. In the decoding process, PELMI first uses identifier bits to block error propagation and label the positions of the error sequences. Then, the decoding algorithm and RS error correction algorithm are used to restore the data. Finally, the erroneous and lost sequences are obtained by traversing the address, and the specific position of the DNA sequence in the image data is calculated to perform local mean iteration for image enhancement.

Parity encoding

To improve the utilization rate of the image data error correction schemes, an error protection strategy is proposed. During the encoding process, the high-impact and low-impact data are first segmented. The RS error correction scheme protects high-impact data and does not protect low-impact data. Binary data are converted into pixel values in groups of 8 bits. Each bit within a group has a different weight influence (pixel weight). The pixel weights for the first to the eighth bit are 2i-1, where i represents the position within the data group. The first four bits of the data are the high-impact data, with a random error affecting the pixel by 60.25, whereas the latter four bits are the low-impact data, with a random error affecting the pixel by 3.75, as shown in Fig. 2c. The error correction capability of RS codes is (n-k)/2, where k is the number of data bits and n is the total number of bits in the RS code. In this paper, RS error–correcting codes are used to correct errors in address and payload. In the optimal scenario, it can correct up to 8 bp, while in the worst-case scenario, it can correct at least 1 bp. Due to the limited error correction capability of RS codes, errors exceeding this range cannot be corrected by the RS code. Therefore, compared to traditional RS error correction methods, this error correction strategy improves performance by 1.88 times. Similarly, to improve the encoding quality, this encoding scheme restricts the undesired motif content while satisfying common biochemical constraints such as GC content and homopolymers [34–36]. First, the binary sequences are segmented into groups of 16. The high-impact data are encoded using odd rules, and the low-impact data are encoded using four mapping methods under even rules, resulting in four types of even encoding sequences. Then, the odd encoding data and even encoding data are paired, and sequences that satisfy the biochemical constraints and have the lowest undesired motif content are selected. Finally, the sequences that meet the constraints are stored according to the even data mapping rules (as shown in Fig. 2a and b). After encoding is completed, to address the problem of error propagation caused by the shift errors in the storage system, which lead to poor image reconstruction, the identifier bits “AC” is introduced to block this from occurring.

Figure 2 Overview of the scheme. (a) Parity encoding workflow: parity encoding utilizes the concept of rotational encoding, where identifier bits are added to the encoded data, resulting in nine bases generated from 16-bit data. (b) Data block constraint: The data blocks synthesized by parity encoding are filtered based on common biochemical constraints and the undesired motifs content. (c) The effects of insertion, deletion, and substitution on the pixels in the transmission channel.

To better explain the encoding process, this section uses a specific example to illustrate it. Assume that the data are “0000000000001111.” First, the binaries at 1–4 and 9–12 are encoded using an odd-parity rule, resulting in AA, AA. Then, the remaining data are encoded using an even-parity rule, yielding the following four encoding outcomes: (i) AA, GG; (ii) TT, AA; (iii) CC, TT; and (iv) GG, CC, as shown in Fig. 2. Next, the odd-parity and even-parity encoded data are recombined according to the order of the transformed binary sequence, and even-parity markers are added. The even-parity markers for the first to fourth even encodings are A, T, C, and G, respectively. The final encoded sequences are AAAAAAGGA, AATTAAAAT, AACCAATTC, and AAGGAACCG. Finally, based on common biochemical constraints and undesirable motif content, the optimal sequence is selected, and the encoding result is AAGGAACCG.

Local mean iteration

In the process of DNA storage, random errors may occur, leading to a decrease in the effectiveness of the image reconstruction or even the inability to reconstruct the image. To address these issues, local mean iteration is proposed. Using identifier bits to determine the error-address positions for local mean iteration, local iterative enhancement is performed based on the characteristics of the pixel correlation in the image.

Identification bit determination and decoding

Random errors in DNA storage include shift and substitution errors. Shift errors can lead to error propagation, resulting in a decrease in the quality of the image reconstruction. To identify the sequence address where shift errors occur, this scheme proposes an identification bit determination strategy. Initially, the relationships between specific base positions and the identification bits AC are examined to mitigate the impact of shift errors on the subsequent data. If the specific base position matches the identification bit AC, it is assumed that no insertion or deletion errors have occurred within the interval data blocks. The identification bit is then removed, and the data below it are merged. Conversely, if the specific base position does not match the identification bit AC, it is inferred that insertion or deletion errors have occurred within the interval. In this case, data merging continues after the identification bit, and the sequence address of the error position is saved. Subsequently, the data without the identification bit are segmented into odd and even data, and parity decoding is performed based on the rule bits in the sequence. Finally, divide every eight bases in the DNA sequence into a group. The first, second, fifth, and sixth bases are decoded according to odd rules, and the remaining bases are decoded according to even rules. After decoding, they are connected according to the original order. The decoded binary data are split into high-impact and low-impact data for RS error correction protection, thereby enhancing the error correction scheme’s protection of the image data.

Local iterative enhancement

Mean iteration is a commonly used image enhancement method that quickly corrects data by comparing the current pixel to the average value of its surrounding pixels and replacing it accordingly. However, this method may inadvertently correct accurate data, leading to image blurring. To improve the accuracy of mean iteration and reduce errors, this paper proposes a strategy called local iterative enhancement. First, the specific positions requiring mean iteration are determined based on the indices of the erroneous and missing data, sequence length, and image size. Second, a 3 × 3 window is created to retrieve the nine neighboring pixels around the current pixel and sort them in ascending order. The current pixel is then checked against a threshold [37]. Finally, the mean of the surrounding nine pixels is calculated, and data outside the threshold are replaced (as shown in Fig. 3). Here, the erroneous and lost sequences are collectively referred to as lossy sequences.

Figure 3 Local iterative enhancement. We utilize erroneous and lost sequence indices to calculate the positions of the errors and then enhance them using the pixel correlation in the image.

Experimental results and analysis

Random errors leading to the inability to reconstruct images and insufficient encoding quality of the image sequence are common issues in current DNA image storage. The encoding quality and image reconstruction are crucial in DNA image storage. Good encoding quality affects the stability and accuracy of synthesis and sequencing, and image reconstruction ensures image recovery and quality under 2% error, thereby improving the accuracy of the image retrieval. Our experimental approach comprised the following steps. First, by comparing the unexpected base sequence content, it is explained whether the encoding sequence has reduced the error probability. At the same time, comparisons are made in terms of encoding density, supported error types, and error correction strategies. Then, single-type (a type of insertion, deletion, substitution error) random errors are used to verify the impact of the different error types on the image reconstruction using different encoding schemes as well as on the quality of the image reconstruction. Finally, by simulating the proportion of the real error types, the reconstructed images are compared under random errors using the PSNR, SSIM, MS-SSIM, and SME to verify the structural and pixel similarity of the reconstructed images [38–41]. Experimental results demonstrate that this scheme enhances the DNA sequence quality (homopolymer, GC content, and lower undesired motifs content) and achieves image reconstruction under general errors (insertion, deletion, and substitution).

General encoding performance analysis

To demonstrate that our storage scheme can improve the encoding quality of images, PELMI is compared with representative works in terms of GC content, error type support (ET), error correction strategy (ECS), undesired motif content (UMC), random access [6], and net encoding density (NID), as shown in Table 1. ET and ECS play crucial roles in accurately recovering data under random errors. For instance, when an error occurs in the address of the DNA sequence, data chain loss may occur during data retrieval.

Table 1 Overall performance comparison of DNA encoding.

Method	ECS	ET	UMC	RA	ND	
Grass et al.	RS	Substitutions, indels	0.21	NO	1.16	
Blawat et al.	Forward error correction	Substitutions, indels	0.15	NO	1.08	
Li et al.	Barrier correction	Substitutions, indels	0.2	NO	1.85	
Ping et al.	RS	Substitutions, indels, strand erasures	0.13	NO	1.33	
PEMLI	Inner RS, outer iterative mean	Substitutions, indels, strand erasures	0.1	YES	1.48	

In comparison with image quality of other representative methods (Grass, Blawat, Li, and Ping), only PELMI allows image reconstruction with 10% chain loss. The chain loss includes whole sequence loss under extreme errors in DNA sequencing and addressing failures due to errors occurring in address. The NID refers to the ratio of the binary data to the number of generated bases, indicating the information content per base. This scheme meets common biochemical constraints through parity encoding and the addition of rule bits and increases the encoding density to 1.48 bits/nt. It offers significant advantages compared with schemes such as Grass, Blawat, and Ping. Although our scheme slightly underperforms the Li scheme, our scheme achieves lossless encoding of images in error-free scenarios. The undesired motifs content was first proposed by Organick et al. [2], and the influence of different base combinations on the DNA storage error rate was determined through wet experiments. It is an important evaluation criterion in encoding schemes, as an increase in the undesired motifs content in DNA sequences can increase the error rate during data retrieval. As shown in Table 1, the undesired motifs content of our scheme was 10%, which was 23%–50% lower than that of the other four encoding schemes, thereby enhancing the reliability of the DNA sequences.

Figure 4 Image reconstruction under single-type errors. The lines in the figure indicate the successful reconstruction results of Grass, Blawat, Li, Ping, and this scheme under different error rates. (a) A replacement error of 0%–0.12% was introduced, and the image was successfully reconstructed. (b) A shift error of 0%–0.6% was introduced, and the image was successfully reconstructed. (c, d) The result of image reconstruction after data supplementation for the other schemes by introducing 0%–2% random error into the transmission channel.

Analysis of image reconstruction under random errors

In DNA storage, three types of errors occur: insertion, deletion, and substitution. We first tested single-type errors to evaluate the impact of the different types of errors on the image reconstruction. Since insertion and deletion errors both cause data shifts and have similar effects on image reconstruction, they are grouped as one error type for analysis. In the simulation experiment, this study encoded five images from the USC-SIPI dataset (a collection of digitized images) and randomly introduced 0%–2% single-type errors into the encoded sequences. The number of single-type errors was gradually increased 6 times, and this process was repeated 20 times for each point. The SSIM was used as a quantitative metric to evaluate the quality of the reconstructed images. As errors increase, the number of errors in the address sequence gradually increases. Consequently, the data link is lost and the image cannot be reconstructed. As shown in Fig. 4a and b, the SR represents the probability of successful image reconstruction. The Li encoding scheme enhances images by adding markers. However, when errors occur in the address, they cannot be corrected. Therefore, image reconstruction fails when shift and substitution errors reach 0.0004 and 0.002, respectively. The Grass, Blawat, and Ping schemes incorporate RS encoding, thereby achieving good error correction performance under low error conditions. For instance, when shift and substitution errors reach 0.0002 and 0.001, respectively, the probability of successful image reconstruction exceeds 60% and 50%. However, as errors increase, the probability of successful image reconstruction rapidly declines. When shift and substitution errors exceed 0.12% and 0.6%, respectively, none of the above four encoding schemes can reconstruct the images; the proposed scheme can achieve image reconstruction with any single error. To further investigate the impact of random errors on image reconstruction, the ratios of substitution, insertion, and deletion errors were set to 8:1:1, as shown in Table 2. When the random error rate reaches 0.3%, the image reconstruction rates of other representative schemes are all below 30%. When the error rate reaches 0.5%, other representative schemes are unable to reconstruct the image, whereas the proposed scheme can achieve reconstruction under any image conditions. PELMI adopts the strategy of error protection to improve the error correction performance of RS error correction encoding. When the errors in the address of the encoding sequence cannot be corrected, they are directly discarded. During image reconstruction, the lost sequence is traversed, and missing data are randomly supplemented. Local mean iteration is performed based on the size of the image and the degree of the sequence to calculate the specific positions of the lost sequence, thus achieving high-quality image reconstruction under 2% error.

Table 2 Image reconstruction success rate under 0.1%–0.5% random error rate.

Method\Error rate	0.1%	0.2%	0.3%	0.4%	0.5%	
Grass et al.	0.65%	0.4%	0.25%	0.01%	0%	
Blawat et al.	0.6%	0.35%	0.15%	0.05%	0%	
Li et al.	0.05%	0%	0%	0%	0%	
Ping et al.	0.5%	0.35%	0.2%	0.1%	0%	
PEMLI	100%	100%	100%	100%	100%	

To verify the impact of single errors on the encoding schemes, missing data in the representative encoding schemes are supplemented to ensure that the images can be reconstructed normally. As shown in Fig. 4, compared with substitution errors, shift errors cause a wider spread of data errors and have a greater impact on the images. In terms of substitution errors, the Blawat, Li, and Ping encoding schemes all exhibit good image reconstruction. The results are shown in Fig. 4c and d. Under 0.5% substitution error, the SSIMs of the reconstructed images of the Blawat, Li, and Ping encoding schemes are higher than 0.67, 0.56, and 0.51, respectively. The reconstructed image’s SSIM of the Grass encoding scheme is below 0.25, as errors in the decoding process can result in the erasure of the entire DNA chain if the erroneous data do not correspond to the Galois field. However, the reconstructed image’s SSIM achieved by this scheme reaches 0.91, representing an improvement of 0.24–0.66 compared with the other representative schemes. As errors increase, this scheme shows a slower decline in performance. For instance, under 1% error, the SSIM of the reconstructed images reaches 0.787, which is an increase of 0.96–5.5 times compared with the other schemes. Visually, there are only minor tearing artifacts in the reconstructed images. When the error rate reaches 2%, the SSIM of the reconstructed images remains at 0.627, whereas the SSIM of the other representative schemes is below 0.3. In the DNA storage process, not only substitution errors exist but also shift errors do. Therefore, PELMI provides for 0%–2% shift errors. When the shift error rate is 0.5%, the SSIM of the reconstructed images of the Grass, Blawat, Li, and Ping schemes is 0.089, 0.171, 0.134, and 0.278, respectively, representing a decrease of 0.14–0.5 compared with substitution errors. When the error rate reaches 1%, the SSIM of the similar structures of the Grass, Blawat, Li, and Ping schemes is below 0.2. Under 0.5% error, the SSIM of the reconstructed images reaches 0.449, representing an increase of one to five times compared with the other schemes. At an error rate of 2%, the SSIM of the reconstructed images is 0.22. The experimental results show that PELMI has better structural and pixel similarity in the single-type error scenario.

Performance analysis of random error image reconstruction

To validate the image reconstruction of the different DNA storage schemes under realistic conditions, this experiment simulated the occurrence of errors at realistic rates, with an insertion, deletion, and substitution ratio of 1:1:8. Errors ranging from 0% to 2% were introduced into the DNA chains to simulate the reconstruction of the images under the different error rates. To quantify the quality of the image reconstruction, four quantitative metrics were used: PSNR, MS-SSIM, SSIM, and mean squared error (MSE). The PSNR and MSE are mainly used to measure the differences between the pixels, and the SSIM and MS-SSIM focus on assessing the structural information in the images. As shown in Fig. 5, when a 1% error was introduced, the PSNR, SSIM, and MS-SSIM of the other representative encoding schemes were below 29, 0.3, and 0.6, respectively. The MSE was above 65, indicating lower structural and pixel similarity. Grass and Blawat employ encoding in the form of data block mapping and combination, but they do not utilize the characteristics of the image data, resulting in low error correction performance utilization rates. Li employs a rotation scheme for encoding, and although it reduces error propagation issues through a barrier correction strategy, the adoption of lossy encoding and uncorrectable errors leads to unsatisfactory image reconstruction results. The Ping encoding scheme filters sequences that meet the constraints through exclusive or (XOR) between the sequences. Consequently, during the decoding process, it relies on address for data restoration, resulting in poor image reconstruction under random errors. By contrast, PELMI employs error protection and local mean iteration strategies. When a 1% error is introduced, compared with the other representative works, the PSNR, MS-SSIM, and SSIM are improved by 10%–13%, 46.8%–122%, and 118%–530%, respectively, and the MSE is reduced by 113%–127%. The image under 1% error is shown in Fig. 6. With increasing errors, PELMI exhibits a slow change in the PSNR, MS-SSIM, SSIM, and MSE. When random errors reach 2%, the PSNR, SSIM, and MS-SSIM of the other representative encoding schemes are below 28.5, 0.25, and 0.55, respectively, and the MSE is above 100. For PELMI, the PSNR, SSIM, and MS-SSIM are higher than 29.5, 0.45, and 0.7, respectively, and the MSE is below 70. The reconstructed image has better clarity, fidelity, and similarity in structure, texture, and detail.

Figure 5 Comparison of image reconstruction between PELMI and other representative schemes. Errors ranging from 0% to 2% were introduced into the transmission channel. The lines in the figure represent the Grass, Blawat, Li, Ping, and PELMI storage schemes, respectively. The reconstructed images are evaluated using the PSNR, SSIM, MS-SSIM, and MSE.

Figure 6 Visual results of the image reconstruction comparing PELMI with the other representative schemes. All four images are from the USC-SIPI dataset and were subjected to 1% random error, with an insertion, deletion, and substitution ratio of 1:1:8.

To further investigate the impact of different error ratios on image reconstruction, this experiment introduced a 1% error rate and set the ratios of insertion, deletion, and substitution errors to 7:1.5:1.5, 6:2:2, 5:2.5:2.5, and 4:3:3, as show in Table 3. The Structural Similarity Index (SSIM) was used to measure image differences. As shown in Table 2, when the error ratio was 6:2:2, the SSIM of reconstructed images using other representative schemes was below 0.3, while the SSIM of our scheme remained above 0.5. When the error ratio was 4:3:3, the SSIM of images reconstructed by our scheme was 0.19–0.22 higher than those of other representative schemes, indicating that our scheme has better structural preservation capability under different error ratios.

Table 3 . Under 1% error, substitution, insertion, and deletion, the reconstructed results under different proportions.

Ratio	Grass et al.	Blawat et al.	Li et al.	Ping et al.	PEMLI	
7:1.5:1.5	0.089	0.22	0.19	0.28	0.6	
6:2:2	0.08	0.2	0.14	0.26	0.52	
5:2.5:2.5	0.071	0.18	0.1	0.22	0.45	
4:3:3	0.068	0.15	0.09	0.2	0.39	

Analysis of image reconstruction under mean iteration

In image reconstruction, mean iteration is a common method for image enhancement. It relies on the high correlation in the image data to determine if there are errors by comparing the current pixel with the surrounding pixels. If an error is detected, the mean value of the surrounding pixels is used to replace the current element to effectively repair the image. However, mean iteration introduces errors and can result in issues such as image blur. To improve the quality of the image reconstruction and investigate the impact of local and global mean iteration on the reconstructed images, PELMI applies local and global mean iteration to the images reconstructed after error correction. The images reconstructed by the four representative encoding schemes were subjected to global mean iteration protection to comprehensively evaluate the effect of mean iteration on image restoration.

The paper first tested the impact of single types of errors, and the results are shown in Fig. 7. For substitution errors, our method shows a slower decline in the SSIM of the reconstructed image as the error increases. With a 0.5% substitution error, our method achieves an SSIM of 0.91, while the SSIMs of the reconstructed images for the Grass, Blawat, Li, Ping, and overall mean iteration schemes are 0.43, 0.71, 0.64, 0.48, and 0.82, respectively. When a 1% substitution error is introduced, the SSIMs of the reconstructed images using our method’s specific location mean iteration, overall mean iteration, and the overall mean iterations of the four mentioned encoding schemes improve by 0.122–0.482. For insertion and deletion errors, our method shows a rapid decline in SSIM when the error rate is between 0.5% and 1%, but the decline slows when the error rate exceeds 1%. Even in these cases, our method’s reconstruction performance remains superior to the other representative schemes. With a 0.5% error rate, our method achieves an SSIM of 0.45, while the Grass, Blawat, Li, Ping, and overall mean iteration schemes achieve SSIMs of 0.20, 0.34, 0.25, 0.40, and 0.40, respectively. When the shift error reaches 2%, the SSIM of our method’s reconstructed image remains 0.02–0.1 higher than the other representative schemes. The experimental results indicate that our method provides better structural similarity in reconstructed images under single types of errors.

Figure 7 The reconstruction result of mean iteration under single class error. The lines in the figure represent the image reconstruction results of the Grass, Blawat, Li, and Ping schemes after mean iteration. The purple and yellow lines represent the results of PELMI after a global mean iteration and specific position mean iteration with error protection.

The experimental results in Fig. 8 demonstrate that when a 1% random error is introduced, the PSNR, SSIM, and MS-SSIM of the reconstructed images after global mean iteration protection for the four representative encoding schemes are lower than 30.5, 0.6, and 0.8, respectively, with the MSE exceeding 65. For PELMI, the PSNR, SSIM, and MS-SSIM are lower than 34, 0.79, and 0.91, respectively, with the MSE exceeding 26. As errors increase, PELMI shows a slow decreasing trend. When errors increase to 2%, the PSNR, SSIM, and MS-SSIM of PELMI improve by 1.3–1.8, 0.07–0.32, and 0.1–0.45, respectively, and the MSE decreases by 20–35. The experimental results indicate that the local mean iteration in PELMI achieves better clarity, fidelity, and structural, textural, and detail similarity in the reconstructed images.

Figure 8 Reconstruction results after mean iteration. The lines in the figure represent the image reconstruction results of the Grass, Blawat, Li, and Ping schemes after mean iteration. The purple and yellow lines represent the results of PELMI after a global mean iteration and specific position mean iteration with error protection.

Conclusion

In response to the shortcomings of the current DNA storage schemes, such as the inability to reconstruct images due to address errors and insufficient encoding quality of the image sequence, we propose the PELMI scheme. An error correction strategy is adopted based on the differences in the pixel weights in the binary data of the image transformation, aiming to improve the utilization rate of the error correction schemes. The data are encoded using a parity encoding scheme, and the DNA data blocks that meet the conditions are selected based on the biochemical constraints and undesired motif content. Good results were achieved by our scheme in aspects such as undesired motifs, supported error types, and random access. The accuracy of DNA sequencing is not only related to biochemical constraints but also affected by the undesired motif content in the sequence. Compared with the representative works, such as those of Li and Ping, the PELMI reduces the undesired motif content by 23%–50%, indicating a reduction in the error rate of the encoding sequence and an improvement in its stability. The support for error types in encoding is an important factor for successful image reconstruction. Compared with the other representative encoding schemes, PELMI can achieve image reconstruction under 2% error, thus enhancing the robustness of the encoding. The error and loss address are obtained through identification bit judgment and address traversal, and the specific positions of the DNA sequences in the image data are calculated based on the error and loss address for mean iteration enhancement. Compared with the representative works, competitive results are obtained under random errors, single-type errors, and mean iteration. For example, under 1% single-type substitution and shift errors, the SSIM of the reconstructed images is improved by 0.31–0.66 and 0.13–0.26, respectively. Under 1% random error, the PSNR and MS-SSIM of the reconstructed images are improved by 10%–13% and 46.8%–122%, respectively, and the MSE is reduced by 113%–127%, leading to enhanced clarity; fidelity; and structural, textural, and detail similarity of the reconstructed images. In summary, PELMI provides a high-quality encoding, randomly accessible, and efficient error-correcting storage system and offers a good solution for high-quality image storage.

Currently, the PELMI scheme still shows tearing artifacts in the reconstructed image as errors increase. In future work, we will delve deeper into image reconstruction under DNA storage environments to improve the image reconstruction performance under random errors. We will strive to develop more accurate error detection schemes for insertion and deletion to address the phenomenon of image tearing in DNA storage. We will also seek to integrate neural networks [42] by providing the positions of the error sequences and employing adversarial neural network training to achieve lossless reconstruction under DNA storage conditions, thereby enhancing the accuracy and reliability of image retrieval from DNA.

Key Points

This paper proposes a parity encoding and local mean iteration (PELMI) scheme, which focuses on the DNA encoding and reconstruction of images.

For encoding, this paper propose parity encoding schemes by screening to satisfy common biochemical constraints and undesired motif content. In addition, the binary data at different positions have different weights for pixels, and an error protection strategy is proposed to improve the performance of RS image protection.

For image reconstruction, we utilize the local mean strategy to find the error or missing sequence, and perform the second correction at the specific position of the image to improve the quality of the image reconstruction.

Experiments show that PELMI ensures robustness and stability of image storage in DNA and achieves relatively high-quality image reconstruction under general errors.

Funding

This work is supported by 111 Project (No. D23006), the National Natural Science Foundation of China (No. 62272079), Natural Science Foundation of Liaoning Province (No. 2022-KF-12-14), the Postgraduate Education Reform Project of Liaoning Province (No. LNYJG2022493), the Dalian Outstanding Young Science and Technology Talent Support Program (No. 2022RJ08), Dalian major projects of basic research (No. 2023JJ11CG002).

Data and code availability

The data and code are available in https://github.com/bencaocs/PELMI.git.
==== Refs
References

1. Dong YM , SunFJ, WuRJ. et al. Research progress on DNA molecules for digital information storage. Synth Biol J 2021;2 :323.
2. Organick L , AngSD, ChenYJ. et al. Random access in large-scale DNA data storage. Nat Biotechnol 2018;36 :242–8. 10.1038/nbt.4079.29457795
3. Nguyen BH , TakahashiCN, GuptaG. et al. Scaling DNA data storage with nanoscale electrode wells. Sci Adv 2021;7 :6714. 10.1126/sciadv.abi6714.
4. Church GM , GaoY, KosuriS. Next-generation digital information storage in DNA. Science 2012;337 :1628–8. 10.1126/science.1226355.22903519
5. Goldman N , BertoneP, ChenS. et al. Towards practical, high-capacity, low-maintenance information storage in synthesized DNA. Nature 2013;494 :77–80. 10.1038/nature11875.23354052
6. Grass RN , HeckelR, PudduM. et al. Robust chemical preservation of digital information on DNA in silica with error-correcting codes. Angew Chem Int Ed 2015;54 :2552–5. 10.1002/anie.201411378.
7. Erlich Y , ZielinskiD. DNA Fountain enables a robust and efficient storage architecture. Science 2017;355 :950–4. 10.1126/science.aaj2038.28254941
8. Wang P , MuZ, SunL. et al. Hidden addressing encoding for DNA storage. Front Bioeng Biotechnol 2022;10 :916615. 10.3389/fbioe.2022.916615.35928958
9. Welzel M , SchwarzPM, LöchelHF. et al. DNA-Aeon provides flexible arithmetic coding for constraint adherence and error correction in DNA storage. Nat Commun 2023;14 :628. 10.1038/s41467-023-36297-3.36746948
10. Cao B , ZhangX, CuiS. et al. Adaptive coding for DNA storage with high storage density and low coverage. NPJ Syst Biol Appl 2022;8 :23. 10.1038/s41540-022-00233-w.35788589
11. Zhu J , ErmannN, ChenK. et al. Image encoding using multi-level DNA barcodes with nanopore readout. Small 2021;17 :e2100711. 10.1002/smll.202100711.34133074
12. Park SJ , ParkH, KwakHY. et al. BIC Codes: bit insertion-based constrained codes with error correction for DNA storage. IEEE Trans Emerg Top Comput 2023;11 :764–77. 10.1109/TETC.2023.3268274.
13. Li X , ChenM, WuH. Multiple errors correction for position-limited DNA sequences with GC balance and no homopolymer for DNA-based data storage. Brief Bioinform 2023;24 :484. 10.1093/bib/bbac484.
14. Blawat M , GaedkeK, HuetterI. et al. Forward error correction for DNA data storage. Procedia Comput Sci 2016;80 :1011–22. 10.1016/j.procs.2016.05.398.
15. Chen W , WangL, HanM. et al. Sequencing barcode construction and identification methods based on block error-correction codes. Sci China Life Sci 2020;63 :1580–92. 10.1007/s11427-019-1651-3.32303959
16. Rasool A , HongJ, HongZ. et al. An effective DNA-based file storage system for practical archiving and retrieval of medical MRI data. Small. Methods 2024;2301585. 10.1002/smtd.202301585.
17. Wu J , ZhangS, ZhangT. et al. HD-Code: end-to-end high-density code for DNA storage. IEEE Trans Nanobioscience 2021;20 :455–63. 10.1109/TNB.2021.3102122.34343096
18. Rasool A , HongJ, JiangQ. et al. BO-DNA: Biologically optimized encoding model for a highly-reliable DNA data storage. Comput Biol Med 2023;165 :107404. 10.1016/j.compbiomed.2023.107404.37666064
19. Dimopoulou M , AntonioEGS, AntoniniM. A JPEG-based image coding solution for data storage on DNA. 2021 29th European Signal Processing Conference (EUSIPCO). Dublin, Ireland: IEEE, 2021;786–90.
20. Li Y , DuD, OuL. et al. HL-DNA: a hybrid lossy/lossless encoding scheme to enhance DNA storage density and robustness for images. 2022 IEEE 40th International Conference on Computer Design (ICCD). Lake Tahoe, USA: IEEE, 2022;434–42.
21. Pan C , TabatabaeiSK, YazdiSMHT. et al. Rewritable two-dimensional DNA-based data storage with machine learning reconstruction. Nat Commun 2022;13 :2984. 10.1038/s41467-022-30140-x.35624096
22. Wu W , XiangL, LiuQ. et al. Deep joint source-channel coding for DNA image storage: a novel approach with enhanced error resilience and biological constraint optimization. IEEE Transactions on Molecular, Biological and Multi-Scale Communications 2023;9 :461–71. 10.1109/TMBMC.2023.3331579.
23. Zheng Y , CaoB, ZhangX. et al. DNA-QLC: an efficient and reliable image encoding scheme for DNA storage. BMC Genomics 2024;25 :266. 10.1186/s12864-024-10178-5.38461245
24. Ren Y , ZhangY, LiuY. et al. DNA-based concatenated encoding system for high-reliability and high-density data storage. Small Methods 2022;6 :2101335. 10.1002/smtd.202101335.
25. Ezekannagha C , BeckerA, HeiderD. et al. Design considerations for advancing data storage with synthetic DNA for long-term archiving. Mater Today Bio 2022;15 :100306. 10.1016/j.mtbio.2022.100306.
26. Thanh DNH , EngínoğluS. An iterative mean filter for image denoising. IEEE Access 2019;7 :167847–59. 10.1109/ACCESS.2019.2953924.
27. Agrawal S , PandaR, MishraPK. et al. A novel joint histogram equalization based image contrast enhancement. J King Saud Univ-Comp Inf Sci 2022;34 :1172–82. 10.1016/j.jksuci.2019.05.010.
28. Veluchamy M , SubramaniB. Image contrast and color enhancement using adaptive gamma correction and histogram equalization. Optik 2019;183 :329–37. 10.1016/j.ijleo.2019.02.054.
29. Anwar S , RajamohanG. Improved image enhancement algorithms based on the switching median filtering technique. Arab J Sci Eng 2020;45 :11103–14. 10.1007/s13369-020-04983-9.
30. Zan X , XieR, YaoX. et al. A robust and efficient DNA storage architecture based on modulation encoding and decoding. J Chem Inf Model 2023;63 :3967–76. 10.1021/acs.jcim.3c00629.37289182
31. Zheng Y , CaoB, WuJ. et al. High net information density DNA data storage by the MOPE encoding algorithm. IEEE/ACM Trans Comput Biol Bioinform 2023;20 :2992–3000. 10.1109/TCBB.2023.3263521.37015121
32. Mu Z , CaoB, WangP. et al. RBS: a rotational coding based on blocking strategy for DNA storage. IEEE Trans Nanobioscience 2023;22 :912–22. 10.1109/TNB.2023.3254514.37028365
33. Ping Z , ChenS, ZhouG. et al. Towards practical and robust DNA-based data archiving using the yin–yang codec system. Nat Comput Sci 2022;2 :234–42. 10.1038/s43588-022-00231-2.38177542
34. Zhao Y , CaoB, WangP. et al. DBTRG: De Bruijn Trim rotation graph encoding for reliable DNA storage. Comput Struct Biotechnol J 2023;21 :4469–77. 10.1016/j.csbj.2023.09.004.37736298
35. Cao B , ZhengY, ShaoQ. et al. Efficient data reconstruction: the bottleneck of large-scale application of DNA storage. Cell Rep 2024;43 :113699. 10.1016/j.celrep.2024.113699.
36. Rasool A , JiangQ, WangY. et al. Evolutionary approach to construct robust codes for DNA-based data storage. Front Genet 2023;14 :1158337. 10.3389/fgene.2023.1158337.37021008
37. Qu G , YanZ, WuH. Clover: tree structure-based efficient DNA clustering for DNA-based data storage. Brief Bioinform 2022;23 :336.
38. Hemalatha J , SekarM, KumarC. et al. Towards improving the performance of blind image step analyzer using third-order SPAM features and ensemble classifier. J Inf Secur Appl 2023;76 :103541. 10.1016/j.jisa.2023.103541.
39. Wang J , ChenP, ZhengN. et al. Associations between MSE and SSIM as cost functions in linear decomposition with application to bit allocation for sparse coding. Neurocomputing 2021;422 :139–49. 10.1016/j.neucom.2020.10.018.
40. Setiadi DRIM . PSNR vs SSIM: imperceptibility quality assessment for image steganography. Multimed Tools Appl 2021;80 :8423–44. 10.1007/s11042-020-10035-z.
41. Khudhair SK , SaHM, KRR. et al. Secure reversible data hiding using block-wise histogram shifting. Electronics 2023;12 :1222.
42. Li X , HanP, ChenW. et al. MARPPI: boosting prediction of protein–protein interactions with multi-scale architecture residual network. Brief Bioinform 2023;24 :bbac524. 10.1093/bib/bbac524.36502435
