根据 BLAST 结果得到了一些序列在染色体上的位置信息,想试着用 Bio.Graphics.BasicChromosome 来画个图看看,遇到了 SeqFeature 对象这个问题。
目前发现可以如此:
from Bio.SeqFeature import SeqFeature, FeatureLocation
# 注意 qualifier 里的列表
# 2 是红色
f = SeqFeature(location=FeatureLocation(5,10), strand=1, type='gene', qualifiers={'gene': [ 'gene1' ], 'color': [ 2 ]})
# 没毛病
可参考:
- 第17章 Graphics模块中的基因组可视化包—GenomeDiagram
- http://biopython.org/DIST/docs/api/Bio.SeqFeature.SeqFeature-class.html