Case file
MTHFR C677T is one of the most studied variants in clinical genetics. It changes alanine 222 of a folate enzyme to valine. Using alignment code written from scratch, this traces that residue across five vertebrates and down to E. coli, where the aligner independently lands on the bacterial residue that researchers mutated in 1999 to model the human variant.
Thesis
A clinical variant matters if the position it changes matters to the protein. Evolution keeps a record of that: positions the enzyme cannot do without stay the same across species. MTHFR C677T changes alanine 222. The question here is how far back that alanine goes.
What the 2023 assignment got wrong
The course assignment aligned human MTHFR with a lizard sequence from NCBI labelled MTHFR-like. That record is a 219-residue fragment. It covers only human residues 519 to 648, about a fifth of the protein, and it contains neither of the two well-known variant positions. Its common wall lizard species has only fragmented MTHFR-like records in the current annotation. A sister species, the Aeolian wall lizard, has the complete 656-residue enzyme, and that is what the new analysis uses. The general point: confirm a sequence is the true counterpart and covers the region in question before reading anything into a similarity score.
Method
Needleman-Wunsch for global alignment and Smith-Waterman for local alignment, both with affine gap costs, written from scratch and scored with BLOSUM62 at the standard EMBOSS gap penalties. Full-length vertebrate enzymes are aligned globally. The bacterial enzyme and the 2023 fragment are aligned locally, because they are not full-length counterparts. Every alignment is projected onto human coordinates to read off the residue at positions 222 and 429.
Result
Alanine 222 is identical in mouse, chicken, lizard, frog and zebrafish. That alone proves little, because 66% of positions are identical across those five. The stronger test is E. coli. Within the 297 positions the bacterial enzyme shares with the human one, only 87 are identical from bacteria to human, and alanine 222 is one of them. The aligner places it opposite E. coli alanine 177, the residue Guenther and colleagues mutated in 1999. Their bacterial mutant was unstable, like the human variant. The second common variant, E429A from A1298C, is identical in all five vertebrates but has no bacterial counterpart: it sits in the regulatory region that only eukaryotes have.
Engineering decisions
Write the aligners, then prove them. Twenty-five randomised tests compare both algorithms against Biopython's scores, and check that every traceback rescores to its own score and rebuilds its input. Each alignment in the analysis is checked again at run time.
Pin the findings. Separate tests assert the headline results, including the E. coli residue number 177, so a change to the aligner cannot quietly move a conclusion.
Replace the impossible dot plot. The 2023 version called an aligner once per cell of a 50,000 by 50,000 grid, 2.5 billion calls. The new one hashes three-residue words and costs time in proportion to the sequence lengths plus the matches.
Verify the inputs. Every sequence length is checked against NCBI's record, and a script re-downloads all nine and diffs them.
Build status
Done. Two aligners, the analysis, two figures, a results file, 30 tests and a deterministic run.
Limits. Five vertebrates and one bacterium is a small panel; a calibrated conservation score needs hundreds of species. Identity treats a conservative substitution as a change. Nothing here estimates the clinical effect of either variant.
Credit
Samuel Henry Mba. Began as a 2023 Bioinformatics assignment at FH Technikum Wien. References: Guenther et al., Nat Struct Biol 1999, doi:10.1038/7594. Froese et al., Nat Commun 2018, doi:10.1038/s41467-018-04735-2.