我有一个fasta文件(第一个序列在下面提到)与长描述。我需要选择特定的描述字段。当我使用下面的代码时;整个描述进入字符串。
from Bio import SeqIO
for record in SeqIO.parse("geneTemp.fasta", "fasta") :
id=record.id
desc=record.description
print desc有没有简单的方法来获取描述字段(使用biopython库)到数组中,并挑选特定的字段,而无需将描述转换为字符串并吐出字符串?
代码输出
Python 2.7 (r27:82500, Sep 16 2010, 18:03:06)
[GCC 4.5.1 20100907 (Red Hat 4.5.1-3)] on localhost.localdomain, Standard
>>> FBgn0197520 type=gene; loc=scaffold_12855:complement(6241650..6242111); ID=FBgn0197520; name=Dvir\GJ10233; dbxref=FlyBase_Annotation_IDs:GJ10233,FlyBase:FBgn0197520,GLEANR:dvir_GLEANR_10171,EntrezGene:6632532,GB_protein:EDW59542,FlyMine:FBgn0197520,OrthoDB4.Arthropods:FBgn0242841,OrthoDB4.Arthropods:FBgn0213090,OrthoDB4.Arthropods:FBgn0190974,OrthoDB4.Arthropods:FBgn0165423,OrthoDB4.Arthropods:FBgn0247590,OrthoDB4.Arthropods:FB