DNA N-gram analysis methodologies have been successfully deployed to provide a wide range of elegant solutions to a variety of complex problems in bioinformatics, such as sequence alignment, DNA barcoding, the identification of functional gene elements, the analysis of microbial genomes, the characterization of protein structures, and the detection of DNA sequence artifacts. Because biological DNA contamination is ubiquitous and therefore unavoidable, it has a significant impact on genomics and genetics research, posing substantial challenges in population genotype calling quality, model organism research, proteomics, and clinical gene therapies such as recombinant adeno-associated viral vector preparations. To this end, I present DNASCAN, DNA Sequence Contamination Analyzer, a scalable and efficient algorithm designed for the high-resolution detection of biological contaminants within source DNA sequences. DNASCAN leverages N-gram analysis, supervised random forest classification, and Bayesian change-point detection to provide precise breakpoints and highly accurate impurity estimates. In summary, DNASCAN yielded 100% purity estimates and breakpoint detection accuracy rates at bacterial contamination levels above 0.1%. Using long-read sequencing data, DNASCAN detected all impurity levels above 0.025%, making it ideal for the removal and reconstitution of contaminated DNA sequences. The software, documentation, and vignettes with detailed code demonstrations are available at https://github.com/jmal0403/DNASCAN/wiki.
Andres Kriete (Tue,) studied this question.