Guest User

Untitled

a guest
Jun 23rd, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. char = []
  2. with open('keratin.txt') as f:
  3. for line in f:
  4. for ch in line:
  5. char.append(ch)
  6. print(char)
  7. len(char)
  8.  
  9.  
  10. f1 = open('keratin.txt','r')
  11. f2 = open('keratin.txt','a+')
  12. lob = input('Enter length of box =')
  13. iob = input('Enter the increment of the box =')
  14.  
  15.  
  16.  
  17. i=0
  18. lob = 5000
  19. iob = 1000
  20. nob = 1 #no. of boxes
  21.  
  22. for i in range (0,len(char)-lob):
  23. b = i
  24.  
  25. while( b < lob + i and b < len(char)):
  26. nC = 0
  27. nG = 0
  28. for p in char:
  29. if p == 'C':
  30. nC = nC + 1
  31. if p == 'G':
  32. nG = nG + 1
  33.  
  34. b = b + 1
  35. print(nC)
  36. print(nG)
  37. i = i + iob
  38. nob = nob + 1
Add Comment
Please, Sign In to add comment