I want to calculate the probability of di-nucleotide AA, TT, AT, and TA in each 2 location.
My DNA sequence is as follows:
DNA.set A DNAStringSet instance of length 5 width seq names  20 TCCGTATTGGAAAGCTCGTC SEQ-1  20 TTAGACCACTCCGCATGTAG SEQ-2  20 CTGTGGTACGGCTCAAACGG SEQ-3  20 CTCCCGCCTATCTCCCTTCT SEQ-4  20 TCGCCTAGAAAAAGTTTCCT SEQ-5
I want to obtain the result as follows:
AA=0,0,0,0,1/5,2/5,0,1/5,0,0 TT=1/5,0,0,0,0,0,0,1/5,1/5,0 AT=0,0,0,0,0,0,0,0,1/5,0,0 TA=0,0,1/5,1/5,1/5,0,0,0,0,0
Any help would be great appreciate.