Entering edit mode
7.4 years ago
Xylanaser
▴
80
hey what's wrong with my script :(?
from Bio import Entrez
Entrez.email = '<censored>'
import time
def fetch(ID):
handle = Entrez.efetch(db = 'Protein', id = ID, retmode = 'fasta', rettype = 'text')
seq = handle.read()
time.sleep(1)
return seq
ids = ['ATK1','Cat','Lig1']
out = [fetch(id) for id in ids]
with open('out.fasta', 'w') as f:
f.writelines(out)
hey what's the error you're getting?
HTTPError: Bad Request
This?
See also this thread
FYI, I censored your email address.