Level 4 — ApplicationBioinformatics & Computational Biology

Bioinformatics & Computational Biology

printable — key stays hidden on paper

Level 4 (Application) | Time: 60 minutes | Total Marks: 60

Instructions: Answer all questions. Apply concepts to the novel scenarios given. No formula sheet provided. Show all reasoning.


Question 1 — Pairwise Alignment & Scoring (14 marks)

You are aligning two short protein fragments using the Needleman–Wunsch global alignment algorithm.

  • Sequence A: HEAG
  • Sequence B: PAWG

Use the following simplified scoring scheme:

  • Match (identical residues): +2
  • Mismatch: −1
  • Linear gap penalty: −2 per gap

(a) Construct the dynamic programming matrix (rows = A with leading gap, columns = B with leading gap) and fill in all cell scores. (6)

(b) State the optimal global alignment score. (2)

(c) Traceback and write ONE optimal alignment. (3)

(d) A colleague suggests replacing the fixed mismatch score with a BLOSUM62 substitution matrix. Explain, in the context of homology detection, one advantage this provides over the fixed −1 mismatch penalty. (3)


Question 2 — BLAST & E-value Interpretation (12 marks)

A researcher submits an unknown 300-residue protein against a database and receives three hits:

Hit % Identity Alignment length E-value Bit score
X 78% 295 3e-140 480
Y 31% 210 2e-08 62
Z 27% 45 4.0 22

(a) Rank the hits by biological significance and justify using two distinct statistical/biological criteria. (4)

(b) Hit Y lies in the "twilight zone" of sequence identity. Explain what this means and why the E-value is still informative here. (3)

(c) The same database is later expanded 10-fold in size. Predict, quantitatively where possible, how the E-value of Hit Z changes, and state whether Hit Z becomes more or less trustworthy. (3)

(d) Explain why BLAST is a heuristic method and what is sacrificed compared to Needleman–Wunsch. (2)


Question 3 — Phylogenetics from a Distance Matrix (13 marks)

You are given the following pairwise distance matrix (arbitrary units) for four taxa:

A B C D
A 0 4 10 12
B 4 0 10 12
C 10 10 0 6
D 12 12 6 0

(a) Using the UPGMA algorithm, construct the phylogenetic tree, showing each clustering step and the height (branch depth) at which each join occurs. (7)

(b) Draw the final tree topology with branch heights labelled. (3)

(c) UPGMA assumes a molecular clock. Describe one scenario in this dataset (or generally) where that assumption would produce an incorrect tree, and name an alternative distance method that relaxes it. (3)


Question 4 — RNA-seq & Variant Calling Workflow (11 marks)

A lab performs RNA-seq on tumour vs. normal tissue (3 replicates each).

(a) Order the following steps into a correct RNA-seq differential-expression pipeline and briefly state the purpose of each: normalisation, read alignment/quantification, quality control (trimming), statistical testing for differential expression, raw read counts. (5)

(b) A gene shows a log₂ fold change of +3.2 with an adjusted p-value of 0.002. Interpret both numbers biologically, and explain why the adjusted (not raw) p-value must be used. (3)

(c) In a parallel DNA variant-calling pipeline, a called variant has high read depth but is present in only 8% of reads at that position. Give one plausible biological explanation and one artefactual explanation. (3)


Question 5 — Machine Learning & Structure Prediction (10 marks)

A team trains a machine-learning classifier to predict whether a protein is an enzyme from its amino-acid composition. They report 97% accuracy.

(a) The dataset contains 95% non-enzymes and 5% enzymes. Explain why 97% accuracy may be misleading, and name two metrics better suited to this imbalanced problem. (4)

(b) Define overfitting and describe one method to detect it and one to reduce it. (3)

(c) AlphaFold predicts protein 3D structure. Explain conceptually why predicting structure from sequence is a "learnable" problem for ML, referencing the role of multiple sequence alignments (co-evolution) as an input feature. (3)


End of paper.

Answer keyMark scheme & solutions

Question 1 (14 marks)

(a) DP Matrix (6 marks) — Rows indexed by A = H,E,A,G; columns by B = P,A,W,G. Gap = −2.

Initialisation: first row/column = multiples of −2.

P A W G
0 −2 −4 −6 −8
H −2 −1 −3 −5 −7
E −4 −3 −2 −4 −6
A −6 −5 −1 −3 −5
G −8 −7 −3 −2 −1

Each cell = max(diag + match/mismatch, up − 2, left − 2).

  • (6 marks: full correct matrix; award ~1 per row correctly filled; −1 per arithmetic slip.)

(b) Optimal score = −1 (bottom-right cell). (2)

(c) Traceback (3 marks) — One optimal alignment:

H E A G
| . | . 
P A W G     →  H-E-A-G vs P-A-W-G

Aligned (no gaps needed on this path):

H E A G
P A W G

Score check: H/P (−1) + E/A (−1) + A/W (−1) + G/G (+2) = −1. ✓ (3 marks)

(d) BLOSUM advantage (3 marks) — A fixed −1 penalises all mismatches equally. BLOSUM62 assigns higher (less negative or positive) scores to conservative substitutions (chemically similar residues that are frequently interchanged in real evolution) and heavier penalties to unlikely ones. This makes the alignment biologically realistic, improving detection of distant homologs whose residues have diverged but retain function. (3 marks: mention differential scoring + evolutionary basis + improved remote homology detection.)


Question 2 (12 marks)

(a) Ranking X > Y > Z (4 marks)

  • X most significant: lowest E-value (3e-140), highest bit score, high identity, near-full-length alignment.
  • Y intermediate: E-value 2e-08 still highly significant (≪ typical 1e-5 threshold), good coverage (210 res).
  • Z insignificant: E-value 4.0 (> 1, expected by chance), short alignment (45 res), low identity.
  • Two criteria: E-value (statistical significance) and alignment length/coverage + % identity (biological substance). (4 marks)

(b) Twilight zone (3 marks) — Identity ~20–35% where sequence similarity alone cannot reliably distinguish homology from chance. Y at 31% falls here. However, the E-value (2e-08) accounts for alignment length and score against database size, so a low E-value over a substantial alignment provides statistical confidence of homology beyond raw % identity. (3 marks)

(c) Database ×10 (3 marks) — E-value scales approximately linearly with database size (E ∝ N). So Z's E-value ≈ 4.0 × 10 = ~40. Hit Z becomes less trustworthy (even more expected by chance). (3 marks)

(d) Heuristic (2 marks) — BLAST seeds on short exact/near-exact words then extends, avoiding a full DP scan → much faster. It sacrifices the guarantee of finding the mathematically optimal alignment that Needleman–Wunsch provides; some weak true hits may be missed. (2 marks)


Question 3 (13 marks)

(a) UPGMA (7 marks)

Smallest distance = A–B (4). Cluster (AB) at height 4/2 = 2.

Recompute distances (average):

  • (AB)–C = (10+10)/2 = 10
  • (AB)–D = (12+12)/2 = 12
  • C–D = 6
(AB) C D
(AB) 0 10 12
C 10 0 6
D 12 6 0

Smallest = C–D (6). Cluster (CD) at height 6/2 = 3.

Recompute:

  • (AB)–(CD) = (10+12)/2 = 11

Final join ((AB),(CD)) at height 11/2 = 5.5. (7 marks: 3 for correct join order, 2 for correct averaging, 2 for correct heights.)

(b) Tree (3 marks)

             ___________ 5.5
            |           |
        __2_|        __3|__
       |    |       |     |
       A    B       C     D

Heights: (A,B) join at 2; (C,D) join at 3; root at 5.5. (3 marks)

(c) Molecular clock failure (3 marks) — UPGMA assumes equal evolutionary rates so root-to-tip distances are equal. If one lineage evolves faster (long-branch, e.g. D accumulating changes rapidly), UPGMA can group taxa by rate rather than true ancestry, misplacing the fast lineage. Alternative: Neighbour-Joining (NJ), which does not assume a clock (produces unrooted, additive trees). (3 marks)


Question 4 (11 marks)

(a) Correct order (5 marks)

  1. Quality control (trimming) — remove low-quality bases/adapters.
  2. Read alignment/quantification — map reads to reference/transcriptome.
  3. Raw read counts — count reads per gene.
  4. Normalisation — correct for library size/composition to allow cross-sample comparison.
  5. Statistical testing for differential expression — identify significantly changed genes. (5 marks: 1 per correctly ordered step with purpose.)

(b) Interpretation (3 marks) — log₂FC +3.2 → gene expressed 2^3.2 ≈ 9.2-fold higher in tumour than normal. Adjusted p = 0.002 → statistically significant after correction. Adjusted p-value (multiple-testing correction, e.g. Benjamini–Hochberg) is required because thousands of genes are tested simultaneously; raw p-values would produce many false positives by chance. (3 marks)

(c) 8% variant (3 marks) — Biological: somatic mosaicism / tumour subclone / low-frequency variant present in a fraction of cells. Artefactual: sequencing/PCR error or misalignment creating spurious calls. (3 marks)


Question 5 (10 marks)

(a) Accuracy misleading (4 marks) — With 95% non-enzymes, a classifier predicting "non-enzyme" for everything scores 95% accuracy while detecting zero enzymes. Accuracy ignores class imbalance. Better metrics: precision & recall (sensitivity), F1-score, or AUC-ROC / Matthews correlation coefficient (any two). (4 marks)

(b) Overfitting (3 marks) — Model learns noise/idiosyncrasies of training data, giving high training but poor unseen performance. Detect: gap between training and validation/test accuracy (cross-validation). Reduce: regularisation, more data, dropout, simpler model, or early stopping. (3 marks)

(c) AlphaFold rationale (3 marks) — Structure is determined by sequence (Anfinsen), so a mapping exists to learn. MSAs reveal co-evolution: residues in physical contact tend to mutate in a correlated way across homologous sequences; these correlations are strong features predicting spatial proximity, which the network exploits to infer 3D contacts and fold. (3 marks)


[
  {"claim":"NW optimal alignment score for HEAG/PAWG equals -1","code":"match=2\nmis=-1\ngap=-2\nA='HEAG'\nB='PAWG'\nimport functools\n@functools.lru_cache(None)\ndef nw(i,j):\n    if i==0 and j==0: return 0\n    opts=[]\n    if i>0 and j>0:\n        s=match if A[i-1]==B[j-1] else mis\n        opts.append(nw(i-1,j-1)+s)\n    if i>0: opts.append(nw(i-1,j)+gap)\n    if j>0: opts.append(nw(i,j-1)+gap)\n    return max(opts)\nresult = (nw(4,4)==-1)"},
  {"claim":"UPGMA root height for given matrix is 5.5","code":"ab_cd=(10+12)/2\nresult = (ab_cd/2==5.5)"},
  {"claim":"log2FC of 3.2 corresponds to ~9.2 fold change","code":"fc=2**3.2\nresult = (abs(fc-9.19)<0.1)"},
  {"claim":"Database expansion x10 raises E-value of Z from 4.0 to ~40","code":"E=4.0*10\nresult = (E==40.0)"}
]