Practical 5: Genomics, systems biology and multi-omics
Learning objectives
Inspect a global-alignment score; distinguish gaps from nucleotide differences; calculate conservation across an explicitly supplied multiple alignment.
Biological question and data
How do alignment and missingness decisions change the apparent conservation of a region?
The local helper uses Needleman–Wunsch global alignment with fixed match, mismatch and linear-gap scores. The multiple alignment is supplied, not inferred by this pairwise helper.
No biological download is required. Numerical inputs are hypothetical, not observed animal data. The runnable examples use base R. Count and abundance units are specified where used.
1. Align two sequences under stated scores
Global alignment compares the entire supplied sequences. Different scoring choices can change an optimal alignment.
Show R code
helper_dir <-if (dir.exists("R")) "R"else"../R"stopifnot(file.exists(file.path(helper_dir,"sequence_helpers.R")))source(file.path(helper_dir,"sequence_helpers.R"))a <-"ACGTACGT"; b <-"ACGACGT"fit <-global_alignment(a,b)fit
These fractions answer different questions. Report the denominator and missingness rather than choosing the larger value.
4. Inspect scoring sensitivity
Different gap costs can favor a mismatch or an insertion/deletion explanation. Compare the score contributions of two hypothetical candidate alignments under two rules. These are supplied candidate counts, not new optimal alignments.
The preferred supplied candidate can change with the cost. The existing alignment helper uses a simple gap rule; affine-gap methods distinguish opening and extending gaps and address a different scoring model.
5. Connect an alignment to downstream claims
Conservation depends on which positions and sequences are comparable. A gap can reflect evolutionary change, incomplete sequence or alignment uncertainty. Filtering uncertain columns changes the denominator for identity and distance. For downstream phylogeny or structure mapping, preserve the relationship between aligned positions and original residue identifiers.
Assess whether sequences are comparable homologous regions before calculating evolutionary distances. A mathematically optimal score is optimal under the supplied scoring rule, not a certificate of true history.
Interpretation challenge
Why should the highest-scoring alignment not automatically be described as the true evolutionary alignment?
Suggested reasoning
The score encodes limited assumptions. Repeats, rearrangements, sequence errors and evolutionary processes can admit multiple plausible alignments. Biological context and sensitivity are needed.
Interpretation and limits
The example does not identify an actual functional element. Conservation depends on alignment quality, phylogenetic diversity and evolutionary processes. Production multiple aligners and evolutionary conservation models need their own method choices and diagnostics.
Exercises
Change the gap score and inspect the result.
Why is N not evidence for a conserved base?
Why does conservation alone not prove function?
Suggested answers
Alternative alignments can become optimal, particularly where mismatch and gap alternatives compete.
Its nucleotide is unknown.
Context, species sampling, evolutionary constraints and biological evidence determine the interpretation.