## 3 Results and Discussion
### CleanSeq Is Practical when Applied to either Simulated or Real Experimental Datasets  
Subsequently, one dataset mimicking bacterial contaminations in real experiments (_E. coli_ contaminated with _P. aeruginosa_, see Materials and Methods) was employed to test CleanSeq. The results are summarized in Figure 4 and show that _P. aeruginosa_ was successfully detected as a contaminant species at about 1/3 (32.3%) contamination rate (Figure 4A) as expected. Due to the high genome similarity of _E. coli_ and _Shigella_[40, 41], _S. sonnei_ and _S. flexneri_ were also listed as potentially contaminating species, indicating the high accuracy of CleanSeq with a low level of analytical bias. CleanSeq also called variants correctly out of a pool of 32. The called variants were further extracted and verified through local alignment and resulted in no misalignment as listed in Figure 4B. The output files with all information regarding the results related to this dataset are further provided in Supplemental Data S1. Additionally, one publicly available contamination dataset from bacterial WGS ([[https://doi.org/10.6084/m9.figshare.c.4282706.v2](https://doi.org/10.6084/m9.figshare.c.4282706.v2)]([https://doi.org/10.6084/m9.figshare.c.4282706.v2](https://doi.org/10.6084/m9.figshare.c.4282706.v2)), accessed on 30 January 2022, [30]) was also used in this study to test CleanSeq, the results of which are also provided as Supplemental Data S2. Figure 2: Comparison of the cleanup performance between CleanSeq and FastQ Screen. Employing a series of simulated datasets with various coverages ((**A,D**), 3\(\times\) and 30\(\times\)), mutation rates ((**B,E**), 1 \(\times\) 10\({}^{-4}\), 1 \(\times\) 10\({}^{-6}\)), and genome similarities ((**C,F**), 0.42% for _E. coli_ and _P. aeruginosa_, 7.73% for _E. coli_ and _S. enterica_, and 82.99% for _E. coli_ and _S. flexneri_, with 30%–70% contamination rates). Two outcome values, efficiency and contamination degree after cleanup were calculated and compared to evaluate the overall performance. Efficiency refers to the ratio of clean reads in total reads. Contamination degree refers to the percentage of mutated reads in clean reads. The higher the cleaning efficiency and the lower the contamination degree, the better performance is indicated. The genome similarity between _E. coli_ and _P. aeruginosa_, _E. coli_ and _S. enterica_, and _E. coli_ and _S. flexner_ is low (0.42%), medium (7.73%), and high (82.99%), respectively. To examine the performance and correctness of CleanSeq towards real experimental datasets, we subjected and analyzed the sequencing results from laboratory experimental evolution of _E. coli_. As demonstrated in Figure 5A, we were interested in selecting cell wall-less (L-form) bacteria exposed to cell wall-targeting reagents (Mecillinam and Lysozyme) via FACS technology and a laboratory experimental evolution [35; 43; 36]. We employed part of the experimental results here because one of the passage lines was unexpectedly contaminated with other bacteria species during cell culture, which served as real practical material for CleanSeq. The WGS datasets from the final passage line P16 and five single colonies were then analyzed by CleanSeq for decontamination and genome-wide mutation analysis starting from the single command line:./cleanSeq MDS42 Ref.fasta ntPath SP5P16.raw_1.fastq.gz SP5P16.raw_2.fastq.gz. As mentioned above, we also compared the efficiency between FastQ Screen [16] and CleanSeq. The overall cleaning efficiency and the read number after cleanup (CleanSeq/FastQ Screen, 3688271/3489622) from CleanSeq were higher than that of the FastQ Screen, implying that CleanSeq could be considered alternatively as a pre-processing tool for decontamination. The contamination analysis based on 10,000 randomly selected reads showed that the final culture was mainly contaminated with _P. aeruginosa_ with a 47.1% contamination degree (Figure 5B). After the decontamination, the overall coverage of remaining reads from _E.