skbio.alignment.TabularMSA.to_dict#
- TabularMSA.to_dict()[source]#
Create a
dict
from thisTabularMSA
.- Returns:
- dict
Dictionary constructed from the index labels and sequences in this
TabularMSA
.
- Raises:
- ValueError
If index labels are not unique.
See also
Examples
>>> 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