Kmer
2-bit encoded representation of a short nucleotide sequence (32 bases or fewer) Encoding: A=0, C=1, T/U=2, G=3 For kmers smaller than 32 bp, leftmost digits are padded with 0 Ambiguous bases (eg. N) are not allowed
val kmer = Kmer(1432462)
val kmerFromString = Kmer("UGCACUGCCA")
val kmerFromSeq = Kmer(NucSeq("TCTCACCTACA")
val kmerFromString = Kmer("NTACCGANNTCG") // throw error - ambiguous bases
val kmerFromString = Kmer("TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT") // throw error - string too longContent copied to clipboard
Functions
Link copied to clipboard
Returns the Hamming Distance between this Kmer and other Kmer
Link copied to clipboard
Returns the reverse complement of a sequence already encoded in a 2-bit long. Note: polyA is used represent unknown, but reverse complement will change it to polyT which does not mean the same. kmerSize parameter is required to remove polyT padding