- Alignment scores and statistical measures are essential for evaluating the quality and biological significance of sequence alignments. When DNA, RNA, or protein sequences are compared, an alignment algorithm assigns scores to matches, mismatches, substitutions, and gaps according to a defined scoring system. These scores help identify favourable sequence correspondences, but a high alignment score does not automatically establish that two sequences are evolutionarily related or share the same biological function. Statistical interpretation is therefore necessary to determine whether an observed alignment is likely to represent meaningful sequence similarity or could have occurred by chance.
- An alignment score is a numerical value that represents how favourable an alignment is under a selected scoring scheme. The score is calculated by adding rewards for matches or favourable substitutions and subtracting penalties for mismatches and gaps. In nucleotide alignment, identical bases generally receive positive scores, while mismatches and gaps receive negative scores. In protein alignment, substitution matrices such as PAM and BLOSUM are commonly used to assign different scores to amino acid pairs.
- A simplified alignment-scoring formula is:
[
S = \sum_{i=1}^{L} s(a_i,b_i) – \text{Gap Penalties}
]
- where (S) is the alignment score, (L) is the number of aligned positions, and (s(a_i,b_i)) is the score assigned to the aligned residue pair at position (i). The exact calculation depends on the scoring matrix, match and mismatch values, and gap-penalty system.
- For a simple DNA alignment, a scoring system might assign +2 for a match, −1 for a mismatch, and −2 for each gap position. An alignment containing 80 matches, 10 mismatches, and 10 gap positions would have a simplified score of:
[
S=(80\times2)+(10\times-1)+(10\times-2)=140
]
- This example uses a linear gap penalty, in which every gap position receives the same penalty. Many practical alignment programs use affine gap penalties, which distinguish between opening a new gap and extending an existing one.
- An affine gap penalty is commonly expressed as:
[
G(k)=g_o+(k-1)g_e
]
- where (G(k)) is the penalty for a gap of length (k), (g_o) is the gap-opening penalty, and (g_e) is the gap-extension penalty. This convention applies the opening penalty to the first gap position and the extension penalty to each subsequent position. Some software uses a different convention, so parameter definitions should always be checked when comparing results.
- Alignment scores are strongly influenced by the selected scoring system. A scoring matrix determines how nucleotide or amino acid substitutions are evaluated. For protein sequences, BLOSUM62 is widely used for general-purpose similarity searches, while other BLOSUM and PAM matrices may be more suitable for different evolutionary distances. A substitution that is common among related proteins may receive a positive score, whereas a rare or chemically unfavourable substitution may receive a negative score.
- The same pair of sequences can therefore produce different alignment scores under different scoring matrices and gap penalties. A higher score under one scoring system is not necessarily directly comparable with a score obtained using another system. Raw scores should generally be interpreted within the context of the scoring parameters and alignment method that generated them.
- Alignment algorithms use different strategies to identify the best alignment. Global alignment compares sequences across their full lengths, while local alignment identifies high-scoring matching regions within sequences. Semi-global alignment allows selected terminal gaps to be unpenalized or less penalized. The resulting scores reflect these different alignment objectives and should not be compared without considering the alignment mode.
- Dynamic programming algorithms such as Needleman–Wunsch and Smith–Waterman calculate optimal global and local alignments, respectively, under their specified scoring systems. Database search tools such as BLAST use heuristic methods to identify promising local similarities efficiently. BLAST alignment scores are therefore interpreted within the statistical framework used by the search program rather than being treated as interchangeable with scores from every other alignment algorithm.
- A raw alignment score is the score calculated directly from the selected scoring system. Although it indicates how favourable an alignment is under that system, its numerical value depends on the scoring matrix, gap penalties, sequence lengths, and alignment method. A raw score of 100 may be highly meaningful in one analysis but less informative in another. Raw scores are therefore not sufficient by themselves for comparing alignments obtained under different conditions or from databases of different sizes.
- The bit score is a normalized alignment score used in sequence database searches, particularly BLAST. It converts a raw alignment score into a scale that allows more meaningful comparisons across searches using different scoring systems. The bit score is based on statistical parameters that describe the relationship between the raw score and the expected frequency of alignments under a chance model.
- The relationship between raw score and bit score is commonly expressed as:
[
S’=\frac{\lambda S-\ln K}{\ln 2}
]
- where (S’) is the bit score, (S) is the raw alignment score, and (\lambda) and (K) are statistical parameters associated with the scoring system and the applicable statistical model. The bit score increases as the alignment becomes more favourable. Higher bit scores generally indicate stronger sequence similarity, although biological interpretation still requires consideration of coverage, sequence composition, and other evidence.
- The E-value, or expect value, is one of the most important statistical measures in sequence database searching. It estimates the number of alignments with a score equal to or greater than the observed score that would be expected to occur by chance in a database search of a particular size, under the statistical model used by the search program.
- A commonly used approximation is:
[
E \approx Kmn e^{-\lambda S}
]
- where (E) is the expected number of chance alignments, (K) and (\lambda) are statistical parameters, (m) and (n) represent effective sequence and database search lengths, and (S) is the raw alignment score. Exact calculations in practical search programs may use effective-length adjustments and other refinements.
- The E-value is related to the bit score through the commonly used expression:
[
E \approx mn,2^{-S’}
]
- where (S’) is the bit score and (m) and (n) represent effective search-space lengths. This relationship illustrates why the E-value depends on both alignment strength and database search size. For a fixed bit score, a larger search space generally produces a larger expected number of chance matches.
- An E-value of 1 indicates that approximately one alignment with an equal or better score is expected by chance in the specified search space. An E-value of 0.01 indicates an expectation of approximately 0.01 such chance alignments, while an E-value of 10 indicates that approximately ten may be expected. These are statistical expectations, not guarantees about the number of false matches in a particular search.
- Very small E-values provide stronger evidence that an alignment is unlikely to have arisen by chance under the assumed statistical model. For example, an E-value of (10^{-50}) represents much stronger statistical evidence than an E-value of (10^{-3}). However, an E-value should not be interpreted as the probability that the sequences are unrelated, nor as the probability that an alignment is false. It is an expected count of chance alignments, not a direct probability of biological relatedness.
- The P-value is another statistical concept used to describe the probability, under a specified null hypothesis, of obtaining a result at least as extreme as the observed one. In sequence searching, it can describe the probability of observing an alignment score at least as high as the observed score under a chance model. For a Poisson approximation to the number of chance matches, the relationship between an E-value and a probability of at least one chance match is:
[
P \approx 1-e^{-E}
]
- When E is very small, this is approximately equal to E. For example, if (E=0.001), the probability of at least one chance match under this approximation is approximately 0.001. When E is large, the probability approaches 1. Although E-values and P-values are related, they are not interchangeable in every context, and their precise interpretation depends on the statistical model and search procedure.
- Statistical significance is used to determine whether an observed alignment provides evidence beyond what might reasonably be expected by chance. In sequence analysis, statistical significance is commonly assessed using E-values, P-values, and bit scores. However, statistical significance is not identical to biological significance. A very small E-value may identify a statistically convincing similarity that has little functional relevance, while a shorter but biologically important conserved motif may have a less impressive statistical score.
- Sequence length has an important influence on alignment statistics. Longer sequences provide more opportunities for matching regions to occur, and database searches involving longer sequences or larger databases have larger search spaces. Consequently, the same alignment score may produce different E-values when the search space changes. This is one reason why E-values are more suitable than raw scores for interpreting database search results, provided that the statistical assumptions and search settings are appropriate.
- Database size is particularly important in BLAST searches. Searching a small database and searching a large database are not statistically equivalent, even if the query and alignment are identical. A larger database provides more opportunities for chance matches, which can increase the E-value associated with a given alignment score. Therefore, researchers should consider the database searched, its composition, and its size when evaluating statistical results.
- Multiple testing is another consideration in large-scale sequence analysis. When thousands or millions of sequences, genomic regions, or variants are examined, some apparently significant results may occur by chance simply because so many comparisons have been performed. In such analyses, statistical procedures such as false discovery rate control may be necessary. The Benjamini–Hochberg procedure is commonly used to adjust P-values in multiple-testing contexts. It is important to distinguish these adjusted statistical values from the E-values reported by an individual BLAST alignment.
- Sequence composition can also influence alignment statistics. Low-complexity sequences, repetitive regions, and compositionally biased proteins may produce matches that appear favourable because certain residues or nucleotides occur unusually frequently. For example, a protein region rich in lysine and arginine may match other similarly charged regions without necessarily indicating a specific shared function. BLAST and other tools may use low-complexity filtering or composition-based adjustments to reduce misleading matches. Researchers should examine whether filtering was applied and consider the biological context of compositionally biased regions.
- Alignment coverage and percentage identity are important when interpreting scores. A high-scoring alignment over a short region may identify a conserved domain or motif, but it does not necessarily indicate that two complete proteins have similar structures or functions. A moderately scoring alignment with high coverage may provide evidence of broader sequence correspondence. Therefore, alignment score, bit score, E-value, percentage identity, query coverage, target coverage, and gap distribution should be considered together.
- For example, a protein alignment with a high bit score, very small E-value, high query coverage, and substantial sequence identity provides stronger evidence of extensive sequence similarity than an alignment with the same E-value but very low coverage. However, even extensive sequence similarity does not automatically establish identical function. Conserved domains, catalytic residues, protein architecture, cellular localization, and experimental evidence may be needed to support functional interpretation.
- BLAST is one of the most widely used tools for statistical interpretation of sequence similarity. It reports several useful measures, including raw alignment scores in appropriate output formats, bit scores, E-values, percentage identity, alignment length, gaps, and query coverage. These statistics allow researchers to assess the strength, extent, and statistical significance of sequence matches.
- A typical BLASTP command for searching a protein query against a protein database is:
blastp \
-query query.fasta \
-db protein_database \
-out blast_results.tsv \
-outfmt “6 qseqid sseqid pident length mismatch gapopen qstart qend sstart send evalue bitscore qcovs”
- The output includes query and subject identifiers, percentage identity, alignment length, mismatches, gap openings, alignment coordinates, E-value, bit score, and query coverage per subject. The precise interpretation of coverage fields depends on the selected BLAST output definition. For example, qcovs reports query coverage per subject across the high-scoring segment pairs, whereas other coverage fields may describe individual alignment segments.
- The following Python example uses Biopython to calculate a pairwise protein alignment score with a substitution matrix and affine gap penalties.
from Bio.Align import PairwiseAligner, substitution_matrices
protein1 = “MKTAYIAKQRQISFVKSHFSRQ”
protein2 = “MKTAYIAKQKQISFVKSHFSRQ”
aligner = PairwiseAligner()
aligner.mode = “global”
aligner.substitution_matrix = substitution_matrices.load(“BLOSUM62”)
aligner.open_gap_score = -10
aligner.extend_gap_score = -0.5
alignments = aligner.align(protein1, protein2)
best_alignment = alignments[0]
print(“Raw alignment score:”, best_alignment.score)
print(best_alignment)
- This example calculates a raw global alignment score. It does not calculate a BLAST bit score or E-value because those statistics require an appropriate statistical model and search-space information. A pairwise alignment score produced by Biopython should not be treated as a BLAST score or assigned a BLAST E-value without a valid statistical procedure.
- For large-scale sequence analysis, researchers should record the alignment program, software version, database version, scoring matrix, gap penalties, alignment mode, filtering options, and search parameters. These details are necessary for reproducibility because changes in databases, scoring systems, and program versions can affect alignment scores and statistical results.
- Statistical interpretation also requires awareness of the limitations of the underlying models. The theoretical significance calculations assume particular properties of random sequence generation and scoring systems. Real biological sequences may contain repeats, biased composition, correlated positions, or evolutionary constraints that differ from simplified random models. Statistical results should therefore be interpreted as evidence within a defined analytical framework rather than as absolute proof of homology or function.
- In evolutionary studies, statistically significant sequence similarity can support the identification of homologous genes and proteins. However, reliable evolutionary inference often requires multiple sequence alignment, phylogenetic analysis, suitable evolutionary substitution models, and examination of conserved structural or functional features. In functional annotation, statistical evidence should be combined with domain analysis, protein architecture, experimental information, and biological context.
- Alignment scores and statistical interpretation provide the foundation for evaluating sequence similarity in bioinformatics. Raw scores describe alignment quality under a particular scoring system, bit scores provide a normalized measure of alignment strength, E-values estimate the expected number of chance matches in a search space, and P-values describe probabilities under specified statistical models. By combining these measures with sequence identity, coverage, gaps, and biological evidence, researchers can make more reliable conclusions about sequence relationships, evolutionary conservation, and potential biological functions.