Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. def SkewArray_new(Genome):
  2.     base_pairs = {'A': 0, 'T': 0, 'G': 1, 'C': -1}
  3.     skew = [0]
  4.     skew = [base_pairs.get(n[1]) for n in enumerate(Genome)]
  5.     return skew
  6.  
  7. # I need this:
  8. [0, -1, -1, -1, 0, 1, 2, 1, 1, 1, 0, 1, 2, 1, 0, 0, 0, 0, -1, 0, -1, -2]
  9.  
  10. # But as I am not accumulation, I get this:
  11. [-1, 0, 0, 1, 1, 1, -1, 0, 0, -1, 1, 1, -1, -1, 0, 0, 0, -1, 1, -1, -1]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement