get_symbols#

biotite.sequence.align.get_symbols(alignment)[source]#

Similar to get_codes(), but contains the decoded symbols instead of codes. Gaps are still represented by None values.

Parameters:
alignmentAlignment

The alignment to get the symbols for.

Returns:
symbolslist of list

The nested list of symbols.

See also

get_codes

Examples

>>> seq1 = NucleotideSequence("CGTCAT")
>>> seq2 = NucleotideSequence("TCATGC")
>>> matrix = SubstitutionMatrix.std_nucleotide_matrix()
>>> ali = align_optimal(seq1, seq2, matrix)[0]
>>> print(ali)
CGTCAT--
--TCATGC
>>> print(get_symbols(ali))
[['C', 'G', 'T', 'C', 'A', 'T', None, None], [None, None, 'T', 'C', 'A', 'T', 'G', 'C']]