Skip to content

Commit f3c3225

Browse files
committed
-Fixed encoding in riplike(#22, #25)
1 parent cfd731f commit f3c3225

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

poplars/riplike.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ def encode(fasta):
6767
assert "query" in bin_fasta, "Argument <fasta> must contain 'query' entry"
6868
_ = bin_fasta.pop('CON_OF_CONS')
6969

70-
binary_nt = {' ': 0B00000, 'A': 0B00001, 'T': 0B00010, 'C': 0B00011, 'G': 0B00100,
71-
'N': 0B00101, 'R': 0B00110, 'Y': 0B00111, 'K': 0B01000, 'M': 0B01001,
72-
'S': 0B01010, 'W': 0B01011, 'B': 0B01100, 'D': 0B01101, 'H': 0B01110,
73-
'V': 0B01111, 'X': 0B10000, '-': 0B1111}
70+
binary_nt = {'A': 0B1000, 'T': 0B0100, 'G': 0B0010, 'C': 0B0001,
71+
'R': 0B1010, 'Y': 0B0101, 'S': 0B0011, 'W': 0B1100,
72+
'K': 0B0110, 'M': 0B1001, 'B': 0B0111, 'D': 0B1110,
73+
'H': 0B1101, 'V': 0B1011, 'N': 0B1111, '-': 0B0000}
7474

7575
for h, s in bin_fasta.items():
7676
seq = []

0 commit comments

Comments
 (0)