Learning Genomic Structure from $k$-mers