aaanalysis.AAlogo
- class aaanalysis.AAlogo(logo_type='probability')[source]
Bases:
objectAmino Acid logo (AAlogo) class for computing sequence logo matrices and conservation scores.
Sequence logos visualize the amino acid composition and conservation at each residue position. AAlogo computes logo matrices from sequence parts using the logomaker package.
Added in version 1.0.3.
- Parameters:
logo_type (
Literal[‘probability’, ‘weight’, ‘counts’, ‘information’])
Methods
get_conservation([df_logo_info, value_type])Summarize per-position information content into a single conservation score.
get_df_logo([df_parts, labels, label_test, ...])Compute a sequence logo matrix for the provided sequence parts.
get_df_logo_info([df_parts, labels, ...])Compute per-position information content (in bits) from sequence parts.
- __init__(logo_type='probability')[source]
- Parameters:
logo_type ({'probability', 'weight', 'counts', 'information'}, default='probability') –
Type of sequence logo encoding:
probability: Normalized probability distribution of amino acids per position.weight: Weighted (log-odds) representation.counts: Raw amino acid counts per position.information: Information content in bits per position.
See also
AAlogoPlot: the respective plotting class.logomaker: the underlying logo computation package.