Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from Bio import Entrez
- Entrez.email = None # change this!
- assert Entrez.email is not None
- # Read ids from file to a list
- id_list = [ ... ]
- results = {}
- handle = Entrez.efetch(db="protein", id=id_list, retmode="xml")
- with handle:
- records = Entrez.read(handle)
- for id_i, rec in zip(id_list, records):
- seq = rec['GBSeq_sequence'].upper()
- results[id_i] = seq
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement