GLOBAL KNOWLEDGE ARK

Biology · Genomics, Omics & Bioinformatics

Sequence alignment, homology and comparative genomics

ACGTAC aligned with ACG-AC has five matching columns and one gap. Is the identity one hundred percent or about eighty-three percent? Both figures can describe this same displayed alignment if their denominators differ. Neither percentage alone supplies the sequences' evolutionary history.

Gene Expression: RNA & Proteins explains how sequence, RNA and protein are related. Phylogeny, Classification & the Tree of Life introduces ancestry and the interpretation of trees. Research Design, Data & Scientific Practice explains sampling, independent units and the limits of comparisons. Their English chapters are available in this working manuscript; publication remains pending. The examples here use letter strings, inclusive coordinates, averages, fractions and ordinary graph reading. Each convention is introduced before it is used.

Back to the Biology map

By the end, you can

Calculate an explicitly defined alignment comparison and distinguish measured similarity from inferred ancestry and functional prediction.

01

An alignment proposes corresponding positions

An alignment arranges sequence positions into proposed correspondences. A gap represents a position without a paired symbol in that arrangement; it is not an observed nucleotide. Matching letters, mismatches and gaps contribute differently to a chosen scoring rule. Different rules, boundaries or local versus whole-sequence comparisons can change the displayed result.

The original alignment has six columns. Five contain paired matching letters and the fourth contains T opposite a gap. Counting matches over all alignment columns gives five divided by six. Counting only columns with two letters gives five divided by five. A percentage becomes interpretable only when the aligned region and denominator are stated.

For its simple assigned score, a match contributes two, a paired mismatch minus one and a gap column minus two. The displayed arrangement scores eight. This arithmetic checks the chosen arrangement, not whether an algorithm would select it as optimal or whether its score is surprising in a biological database.

Identity changes with the denominator

Identity changes with the denominatorA six-column original alignment retains five matches and one gap beside two explicitly different identity summaries and an assigned score.Alignment column123456First assignedstringACGTACSecond assignedstring with a gapACG-ACAssigned columnscore222-222Matches divided by all columns015/6Matches divided by paired-letter columns015/5Sum of assigned scores: 8Gap columnNo ancestry or function is supplied by this score
The denominator and gap convention belong with the percentage. A high identity in these tiny strings does not establish common ancestry.
Read the diagram in words

Columns one, two, three, five and six match. Five/six is all-column identity; five/five is paired-letter identity. Five times two minus two gives score eight.

Alignment column
Alignment columnFirst assigned stringSecond assigned string with a gapTwo letters in this columnMatching paired lettersAssigned column score
1AA✓✓2
2CC✓✓2
3GG✓✓2
4T-××-2
5AA✓✓2
6CC✓✓2
Assigned column score
Matching paired letters ✓2
Matching paired letters ×-1
Gap column-2
Identity changes with the denominator
Matches divided by all columns5/6 = 0.8333333333333334
Matches divided by paired-letter columns5/5 = 1
Sum of assigned scores8

No ancestry or function is supplied by this score

Original tiny DNA-letter alignment supplied as a fixed arrangement. Gap is a display symbol, not a nucleotide. Assigned match/mismatch/gap-column weights are not a biological substitution model, optimality proof, search statistic or homology probability.

02

Homology concerns shared ancestry

Similarity is a property of a comparison. Homology is a relationship of common evolutionary ancestry inferred from evidence. A statement that two regions have eighty percent identity is meaningful under a defined alignment; calling them eighty percent homologous confuses the comparison with the ancestry claim.

Appropriately assessed excess similarity can support common ancestry. Its evidential meaning depends on sequence length, composition, the comparison and the search context. A short identical pattern can appear without establishing a shared gene history. Conversely, failure to detect a strong sequence match does not establish that common ancestry is impossible.

The displayed toy letters have no assigned real organism or history. Their identity calculation therefore remains a comparison only. For the separate genealogy model, ancestry is stipulated explicitly so that we can practise reading the relationships. It is not inferred from the six-column alignment.

03

Gene relationships are not a function guarantee

In the assigned genealogy, an ancestral copy duplicates before the lineage splits into species A and B. Each species retains two descendants. A1 and B1 are related through the first copy's speciation event; A1 and A2 are related through the earlier duplication. Orthology and paralogy describe these event relationships.

Genes in different species can also be paralogues: A1 and B2 trace their most recent shared gene ancestor to the duplication. Species membership alone therefore does not identify the relationship. The model preserves the two duplication-derived branches so that rotating the drawing would leave these relationships unchanged.

Related sequences can provide clues to structure or function, but a particular activity needs additional evidence and context. A conserved region may support a narrower comparison than an entire protein; related products can differ in regulation or specificity. Comparative genomics combines sequence relationships with other evidence rather than treating the closest-looking string as a complete functional answer.

The shared gene ancestor determines the relationship

The shared gene ancestor determines the relationshipA stipulated duplication precedes two speciation nodes, preserving the relationships among four named gene descendants.AncestralduplicationFirst copyat speciessplitSecond copyat speciessplitSpecies A,copy one · A1Species B,copy one · B1Species A,copy two · A2Species B,copy two · B2◇ Copy divergence through duplication; ○ Copy divergence throughspeciationOrthologues through speciationA1B1Most recent shared gene ancestor: First copy at species splitOrthologues through speciationA2B2Most recent shared gene ancestor: Second copy at species splitParalogues within species AA1A2Most recent shared gene ancestor: Ancestral duplicationParalogues across speciesA1B2Most recent shared gene ancestor: Ancestral duplicationHistory is assigned independently of the toy alignment
Different species can contain paralogous genes. Rotating a branch leaves the ancestor relationships unchanged.
Read the diagram in words

The duplication has branches to two copy-specific speciation nodes. A1/B1 and A2/B2 share speciation ancestors; A1/A2 and A1/B2 share the duplication ancestor.

Most recent shared gene ancestor
Assigned ancestral event or descendantGene relationship
Ancestral duplicationCopy divergence through duplication
First copy at species splitCopy divergence through speciation
Second copy at species splitCopy divergence through speciation
Species identity
Assigned ancestral event or descendantSpecies identity
Species A, copy one · A1A
Species B, copy one · B1B
Species A, copy two · A2A
Species B, copy two · B2B
Assigned ancestral event or descendant
Assigned ancestral event or descendant
Ancestral duplication → First copy at species split
Ancestral duplication → Second copy at species split
First copy at species split → Species A, copy one
First copy at species split → Species B, copy one
Second copy at species split → Species A, copy two
Second copy at species split → Species B, copy two
Gene relationship
Assigned ancestral event or descendantGene relationshipMost recent shared gene ancestor
A1 ↔ B1Orthologues through speciationFirst copy at species split
A2 ↔ B2Orthologues through speciationSecond copy at species split
A1 ↔ A2Paralogues within species AAncestral duplication
A1 ↔ B2Paralogues across speciesAncestral duplication

History is assigned independently of the toy alignment

Original assigned gene history: duplication before species divergence, two retained branches in each species, no loss, transfer, recombination, dates or sequence-derived tree inference. Coordinates are layout only; no functional identity follows.

Worked example

Separate an arithmetic comparison from an ancestry account

The aligned strings are ACGTAC and ACG-AC. Matching columns are one, two, three, five and six. The all-column identity is five/six, approximately 0.8333, while paired-letter identity is five/five, or one. The gap must stay visible beside either summary.

Five matches contribute ten score units and one gap contributes minus two, giving eight. No random reference distribution or database-search statistic was supplied. The score cannot be converted into a probability of common ancestry or identical function.

In the separate assigned tree, A1/B1 and A2/B2 are orthologous pairs. A1/A2 and A1/B2 are paralogous pairs because their shared ancestor is the duplication. These statements follow from the stipulated events, not from branch spacing, species names alone or an identity threshold.

Check your understanding

  1. Why do the two identity percentages disagree without an arithmetic error?

    Show reasoning

    One divides five matches by all six columns; the other divides by the five columns with two letters. The summaries use different denominators and must retain the gap and convention to be meaningful.

  2. Does an identical two-letter pattern establish homology or function?

    Show reasoning

    No. Its identity can be calculated, but such a short comparison lacks sufficient context for that biological inference. Common ancestry and specific activity require suitable additional evidence.

  3. Can A1 and B2 be paralogues even though they are in different species?

    Show reasoning

    Yes. In the assigned genealogy, their shared gene ancestor is the duplication before speciation. Different species alone do not make a gene pair orthologous.

What to carry forward

State the alignment and denominator, then separately justify any ancestry or function inference.

References

Resources supporting this lesson’s explanations and examples.

  1. EMBL-EBI Training2 sources
    1. Comparing · Bioinformatics for the terrified (Original training page inspected 13 October 2026)EMBL-EBI TrainingOriginal institutional tutorialebi.ac.ukRead source
    2. Domain duplication and divergence (Original institutional tutorial, inspected 13 October 2026)EMBL-EBI TrainingOriginal institutional tutorialebi.ac.ukRead source
  2. An Introduction to Sequence Similarity (“Homology”) Searching (Current Protocols in Bioinformatics 42:3.1.1–3.1.8 (2013). DOI: 10.1002/0471250953.bi0301s42)William R. PearsonOriginal tutorial paper · PDFwrpearson.github.ioRead source