Question: how to get protein sequence biopython
2.9 years ago by
Xylanaser • 60
Poland - Warsaw - SGGW/WULS
Xylanaser • 60 wrote:
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)
ADD COMMENT • link •