skbio.alignment.TabularMSA.to_dict¶
- TabularMSA.to_dict()[源代码]¶
创建一个
dict由此TabularMSA.状态:从0.4.1开始试验。
- 返回:
由索引标签和序列构造的字典
TabularMSA.- 返回类型:
dict
- 抛出:
ValueError -- 如果索引标签不是唯一的。
参见
from_dict,index,reassign_index示例
>>> from skbio import DNA, TabularMSA >>> seqs = [DNA('ACGT'), DNA('A--T')] >>> msa = TabularMSA(seqs, index=['a', 'b']) >>> dictionary = msa.to_dict() >>> dictionary == {'a': DNA('ACGT'), 'b': DNA('A--T')} True