Perform a coevolutionary analysis on biological sequence alignments¶
Section author: Greg Caporaso
This document describes how to perform a coevolutionary analysis on a ArrayAlignment
object. Coevolutionary analyses identify correlated substitution patterns between ArrayAlignment
positions (columns). Several coevolution detection methods are currently provided via the Cogent3 coevolution module. ArrayAlignment
objects must always be used as input to these functions.
Before using an alignment in a coevolutionary analysis, you should be confident in the alignment. Poorly aligned sequences can yield very misleading results. There can be no ambiguous residue/base codes (e.g., B/Z/X in protein alignments) – while some of the algorithms could tolerate them (e.g. Mutual Information), others which rely on information such as background residue frequencies (e.g. Statistical Coupling Analysis) cannot handle them. Some recoded amino acid alphabets will also not handle ambiguous residues. The best strategy is just to exclude ambiguous codes all together. To test for invalid characters before starting an analysis you can do the following:
To run a coevolutionary analysis, first create a ArrayAlignment
:
Perform a coevolutionary analysis on a pair of positions in the alignment using mutual information (mi
):
Perform a coevolutionary analysis on a pair of positions in the alignment using statistical coupling analysis (sca
):
Perform a coevolutionary analysis on one position and all other positions in the alignment using mutual information (mi
):
Perform a coevolutionary analysis on all pairs of positions in the alignment using mutual information (mi
):
View the available algorithms for computing coevolution values:
Perform an intermolecular coevolutionary analysis using mutual information (mi
). Note that there are strict requirements on the sequence identifiers for intermolecular analyses, and some important considerations involved in preparing alignments for these analyses. See the coevolve_alignments docstring (i.e., help(coevolve_alignments)
from the python interpreter) for information. Briefly, sequence identifiers are split on +
symbols. The ids before the + must match perfectly between the two alignments as these are used to match the sequences between alignments. In the following example, these are common species names: human, chicken, echidna, and pig. The text after the +
can be anything, and should probably be the original database identifiers of the sequences.