ArcozeloMen

Bio - aula 3

Mar 13th, 2017
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. // 1 //
  2. # Hello World program in Python
  3.  
  4. print "Hello World!\n"
  5. adn='acaagatgcc attgtccccc ggcctcctgc tgctgctgct ctccggggcc acggccaccg'
  6. a=adn.count('a')
  7. c=adn.count('c')
  8. g=adn.count('g')
  9. t=adn.count('t')
  10. print(str(a)+" "+str(c)+" "+str(g)+" "+str(t))
  11.  
  12. // 2 //
  13. adn='acaagatgcc attgtccccc ggcctcctgc tgctgctgct ctccggggcc acggccaccg'
  14. adn2=adn.replace('a','T')
  15. adn2=adn2.replace('t','A')
  16. adn2=adn2.replace('g','C')
  17. adn2=adn2.replace('c','G')
  18. print(adn2)
  19.  
  20. // Aula 4
  21. http://www.bioinformatics.org/tutorial/1-1.html
  22.  
  23. // 6
  24. rna = ('AUG','GAA','UUC','UCG','CUC')
  25. lista={'AUG':'M','GAA':'E','UUC':'F','UCG':'S','CUC':'L'}
  26. for a in rna:
  27. if a in lista:
  28. print(lista[a])
  29.  
  30.  
  31. // 8
  32. fich=open("/home/aluno/Downloads/data.csv","r")
  33.  
  34. for linha in fich:
  35. if ("Drosophila melanogaster" in linha) or ("Drosophila simulans" in linha):
  36. a=linha.split(',')
  37. print(a[0])
Advertisement
Add Comment
Please, Sign In to add comment