## 4 Conclusions  
This study designed a Python-pipeline CleanSeq to detect and eliminate contaminated reads from bacterial WGS datasets. After obtaining the clean reads, CleanSeq further verifies the possible variants claimed from GATK by local re-alignment of corresponding reads with generated _k_-mer references. The performance was confirmed using various datasets, either simulated or real experimental datasets derived from laboratory experimental evolution in _E. coli_. Based on the results compared to other existing pipelines, we concluded that  
Figure 5: Performance of CleanSeq on a real experimental dataset. (**A**) The schematic representation of a laboratory experimental evolution in _E. coli_. Following the addition of cell wall-targeting reagents in culture media, Mecillinam, and lysozyme, bigger cells sorted from FACS (CS) were used for subsequential passages. The strategy of the CS-passage cycle was repeated 16 rounds for laboratory experimental evolution. The indicated strains and single colonies (P16 and P16S1-5) were subjected to WGS. The results from CleanSeq were plotted, showing the taxonomic classification of all reads in (**B**) and seven genome variants in both P16 and P16S1-5 were found and verified, as summarized in a Venn diagram (**C**). CleanSeq has satisfactory correctness and could be employed as either a pre-processing tool for decontamination of raw reads or mutation calls and verifications of mutations of interest. The results from CleanSeq could also be utilized as a reference to evaluate the WGS data quality and make a decision for a further experimental plan. The following supporting information can be downloaded at: [[https://www.mdpi.com/article/10.3390/app12126209/s1](https://www.mdpi.com/article/10.3390/app12126209/s1)]([https://www.mdpi.com/article/10.3390/app12126209/s1](https://www.mdpi.com/article/10.3390/app12126209/s1)), Supplemental Data S1: Output report on the simulated contamination test dataset (The output reports contain the information for the input file, a detailed list for contamination detection, and a list of the top ten contaminated species. All the statistical results for reads and mutations are also provided. ); Supplemental Data S2: CleanSeq output report on the public contamination test dataset ([[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) used in this study; Supplemental Data S3: CleanSeq output report on the P16 experiment data; Supplemental Data S4: Extracted reads containing variants based on seven generated \(k\)-mers. Conceptualization: [PERSON] and T.Y. ; Data curation: [PERSON] and J.X. ; Formal analysis: [PERSON] and J.X. ; Funding acquisition: T.Y. ; Investigation: [PERSON], [PERSON], [PERSON] and T.Y. ; Methodology: Y.L., C.K., D.T., H.L. and F.H. ; Project administration: [PERSON] and T.Y. ; Resources: Y.L., N.L., D.T. and H.L. ; Software: C.W. ; Supervision: [PERSON] and [PERSON]; Writing--review & editing: [PERSON], [PERSON], [PERSON] and T.Y. All authors have read and agreed to the published version of the manuscript. The research was partially funded by the MOE International Joint Laboratory of Trustworthy Software at East China Normal University (to T.Y.). Not applicable. All relevant data are within the paper and its Supporting information files. The pipeline created in this study is publicly available at [[https://github.com/bingxiao-wcy/cleanSeq](https://github.com/bingxiao-wcy/cleanSeq)]([https://github.com/bingxiao-wcy/cleanSeq](https://github.com/bingxiao-wcy/cleanSeq)) (accessed on 30 January 2022). We appreciated all the technical support and helpful discussion from [PERSON] (Shanghai Tenth People's Hospital, School of Medicine, Tongji University) and all members of [PERSON]'s group at East China Normal University. We also thank [PERSON] for proofreading and language editing this manuscript. The authors declare no conflict of interest.