Transforming DNA Sequences into Musical Patterns Via A 3-mer Classification - Abel Prayoga; Elis Khatizah (Universitas Al Azhar Indonesia, 2026)
DNA can be viewed as a symbolic sequence with patterns that vary across species. This study explores DNA sequences through two complementary approaches: species classification using simple machine learning methods and transformation of DNA into musical note representations. In the first task, DNA sequences from five organisms with different evolutionary distances are represented using 3-mer and 6-mer features. These k-mers form a vocabulary whose frequency counts are converted into feature vectors. Random Forest (RF) and Support Vector Machine (SVM) models are then applied for five-class classification. Using an 80:20 train-test split and 10-fold cross-validation, the SVM model achieved average accuracies above 0.90 for 3-mer features, with low standard deviation, indicating stable performance. In the second approach, 3-mer motifs are mapped to musical notes to generate species-based musical patterns. The resulting musical representations exhibit distinct structural differences across species, reflecting variations in underlying sequence composition. Overall, the results demonstrate that 3-mer features are effective for species discrimination and that musical transformation provides an alternative and intuitive way to visualize DNA sequence patterns.Keywords – DNA Classification, DNA-to-Music, Random Forest, SVM.