Mercurial > repos > abims-sbr > cds_search
comparison scripts/S01_find_orf_on_multiple_alignment.py @ 10:3d00be2d05f3 draft
planemo upload for repository https://github.com/abims-sbr/adaptsearch commit 7d45b8e07bf99420df9b195617515b8002b5eaf3
| author | abims-sbr |
|---|---|
| date | Fri, 06 Jul 2018 02:52:15 -0400 |
| parents | 640ef4c06ed5 |
| children | 06a28df198b6 |
comparison
equal
deleted
inserted
replaced
| 9:640ef4c06ed5 | 10:3d00be2d05f3 |
|---|---|
| 301 ###### Reference: http://crazyhottommy.blogspot.fr/2013/10/python-code-for-getting-reverse.html | 301 ###### Reference: http://crazyhottommy.blogspot.fr/2013/10/python-code-for-getting-reverse.html |
| 302 ############################################################ | 302 ############################################################ |
| 303 def ReverseComplement2(seq): | 303 def ReverseComplement2(seq): |
| 304 # too lazy to construct the dictionary manually, use a dict comprehension | 304 # too lazy to construct the dictionary manually, use a dict comprehension |
| 305 seq1 = 'ATCGN-TAGCN-atcgn-tagcn-' | 305 seq1 = 'ATCGN-TAGCN-atcgn-tagcn-' |
| 306 seq_dict = { seq1[i]:seq1[i+6] for i in range(24) if i < 6 or 12<=i<16 } | 306 seq_dict = { seq1[i]:seq1[i+6] for i in range(24) if i < 6 or 12<=i<=16 } |
| 307 return "".join([seq_dict[base] for base in reversed(seq)]) | 307 return "".join([seq_dict[base] for base in reversed(seq)]) |
| 308 ############################ | 308 ############################ |
| 309 | 309 |
| 310 | 310 |
| 311 ####################### | 311 ####################### |
