【发布时间】:2015-09-23 15:34:14
【问题描述】:
是否可以输出 CDS 特征的基因位置,还是我需要自己解析“位置”或“补充”字段?
例如,
seq = Sequence.read(genbank_fp, format='genbank')
for feature in seq.metadata['FEATURES']:
if feature['type_'] == 'CDS':
if 'location' in feature:
print 'location = ', feature['location']
elif 'complement' in feature:
print 'location = ', feature['complement']
else:
raise ValueError('positions for gene %s not found' % feature['protein_id'])
会输出:
位置 =
位置 = 687..3158
对于 this 样本 GenBank 文件。
此功能在 BioPython 中是可能的(请参阅 this thread),我可以在其中输出已解析的位置(例如 start = 687,end = 3158)。
谢谢!
【问题讨论】:
标签: skbio