擅长:python、mysql、java
<p>我用biopython解析embl文件并提取信息</p>
<pre><code>from Bio import SeqIO
input = "test.embl" #change your input, here
#next if you had one sequence in the input file
seq = SeqIO.parse(open(input), "embl").next()
UTR5 = [feature for feature in seq.features if feature.type=="5'UTR"]
#you have only one 5'utr
genes = UTR5[0].qualifiers['gene']
#you get ['Ngp']
#Create SeqRecord
from Bio.SeqRecord import SeqRecord
#you may remove description, if not required
new_record = SeqRecord(seq.seq, id= "_".join(genes),
name=seq.name, description=seq.description)
print new_record.format("fasta")
</code></pre>
<p>你会得到:</p>
^{pr2}$