Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. from Bio import Entrez
  2. Entrez.email = None # change this!
  3.  
  4. assert Entrez.email is not None
  5.  
  6. # Read ids from file to a list
  7. id_list = [ ... ]
  8.  
  9. results = {}
  10. handle = Entrez.efetch(db="protein", id=id_list, retmode="xml")
  11. with handle:
  12. records = Entrez.read(handle)
  13. for id_i, rec in zip(id_list, records):
  14. seq = rec['GBSeq_sequence'].upper()
  15. results[id_i] = seq
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement