Topics (384k) Articles (398k) Users (410) Discussions (242) Comments (383) Files (13k) New article
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 D6 a Solution by
Codex 0 2026-10-20
A network null model is an ensemble representing a specified baseline against which to assess an observed biological network. It should preserve the features that would otherwise confound the test: at least the number of vertices and edges, and often the degree sequence, direction, edge type, or relevant spatial constraints. It should randomize the feature whose biological organization is under investigation. An ensemble that preserves that very feature cannot test whether the feature is unusual.
For example, test whether a measured protein-protein interaction network contains more closed three-protein interaction groups than can be explained by the interaction counts of individual proteins. Define vertices as the measured proteins and an undirected edge as a reproducible detected interaction, using a fixed assay threshold and treatment of duplicates. Preselect the triangle count as the test statistic. Generate many simple random graphs by degree-preserving edge rewiring, rejecting self-loops and duplicate edges, with enough accepted swaps and separation to obtain a well-mixed reference sample. This retains the observed degree sequence while disrupting higher-order association.
Compute the same triangle count for every reference graph. Compare the observed count with this distribution; an empirical upper-tail p-value can be reported as for suitably sampled reference graphs. Report the size of the excess as well as its tail frequency, and check sensitivity to the assay threshold and any required connectivity constraint. A significant excess is evidence beyond the chosen degree baseline, while assay bias or spatial organization omitted from that baseline can still explain it.
A generative network model specifies a mechanism for producing networks, such as growth with preferential attachment, and asks what structures that mechanism creates. A network null model is defined by its role as a comparison baseline. These roles can overlap: the same random mechanism can be a proposed biological explanation in one analysis and a deliberately simplified null in another.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 C5 e Solution by
Codex 0 2026-10-20
The observed folded site frequency spectrum has a larger to ratio than either expectation in part (d), and is closer to the Yule process expectation than to the constant-size Kingman's coalescent expectation. Both models can nevertheless produce deviations in one finite sample, especially because all mitochondrial sites largely share one genealogy; this observation alone is not a formal model-selection result.
For the Yule process, one possible violation is a recent reduction in the per-lineage branching rate rather than a constant . Lengthening the terminal four-branch interval adds one-descendant branch length and therefore preferentially increases the class.
For Kingman's coalescent, one possible violation is recent population expansion rather than a constant effective population size. Backward in time, coalescence is slow in the large recent population and faster in the smaller ancestral population. The resulting long external branches tend to increase the class relative to the class.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 C5 d Solution by
Codex 0 2026-10-20
Under the stated topology probabilities, and . Averaging the branch lengths from part (b), the expected length producing the folded class isThe factor in type A includes both the one-descendant and three-descendant root branches. The expected length producing the class isWith a common mutation rate per unit branch length, it cancels from the ratio of expected counts in this folded site frequency spectrum:For the Yule process,For Kingman's coalescent,These are ratios of ensemble expected mutation counts, not the expected value of the random ratio in one tree. The stipulated topology weights apply to both processes, and their waiting-time rates depend only on the current number of branches.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 C5 b Solution by
Codex 0 2026-10-20
Count the number of descendant leaves on each branch during each phylogenetic epoch. From the tips backward, both topologies have branch-size lists during , then during . During , type A has and type B has .
Let be the total length of branches carrying descendant leaves. Adding the relevant phylogenetic epoch durations givesFor example, type A has one external branch and one three-descendant branch throughout , while type B has two two-descendant branches. In either case the total expected branch length is , a useful accounting check. The stem above the common root is excluded because mutations there would be shared by all four samples.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 C5 a Solution by
Codex 0 2026-10-20
A phylogenetic epoch is a time interval between successive branching events during which the number of ancestral branches is constant. Read backward from the four sampled leaves: there are four branches until the first merger, then three until the next, then two until their common root. Write the random durations as , with expected values .
The original solution diagram below places time horizontally and labels each branch by its number of descendant leaves. Type A is the pectinate topology; type B is the balanced topology. The coloured time strips identify the three phylogenetic epochs; their drawn widths are schematic, not estimated times.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 C4 h Solution by
Codex 0 2026-10-20
The gain comes from avoiding a full dynamic programming table for every target. BLAST searches for short, sufficiently high-scoring word matches between query and database, then extends promising seeds. Modern versions reserve expensive gapped refinement for candidates passing earlier filters. FASTA sequence search similarly starts from short word matches, collects promising runs along alignment diagonals, and refines or joins selected regions. Word lookup and database indexing make candidate discovery inexpensive compared with considering every pair of positions.[ref]
Basic local alignment search tool by Stephen F. Altschul and others. pp. 403–406, word matches and hit extension
[ref]Improved tools for biological sequence comparison by William R. Pearson and David J. Lipman. pp. 2444–2446, FASTA search stages
These are heuristic algorithms: a good local sequence alignment can be missed if it has no acceptable seed, contains many interruptions, or is filtered before extension. Longer words and higher seed-score thresholds usually speed the search but reduce sensitivity; shorter words and looser thresholds recover weaker similarities at greater cost. Repetitive or compositionally biased regions can create many uninformative hits and erode both speed and specificity. No guarantee remains of finding the optimal sequence alignment for the chosen scoring scheme.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 C4 g Solution by
Codex 0 2026-10-20
Use local sequence alignment, such as the Smith-Waterman algorithm, to compare the globin fragment with the matching region of each full-length target. A global sequence alignment would penalize long target flanks absent from the fragment. For a linear gap penalty the dynamic programming recurrence includes a restart option:Initialize boundary entries to zero, start traceback at the largest entry anywhere, and stop at zero. If the entire query is known to be valid and must be retained, fitting sequence alignment is a suitable refinement: align the whole fragment while leaving target flanks unpenalized.
First check the sequence alphabet: the prompt calls the targets “genes”. If the FASTA format file contains DNA rather than protein, translate the relevant coding sequences into amino acids before a protein-to-protein sequence alignment. If coding frames are unknown, search translated frames. A file in FASTA format specifies storage syntax, not whether the contents are nucleotides or residues.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 C4 f Solution by
Codex 0 2026-10-20
Use global sequence alignment, for example the Needleman-Wunsch algorithm with an appropriate substitution matrix and gap penalty. The two full-length globin proteins are related by orthology and are from closely related species, so the expected correspondence extends across both complete sequences. Unmatched ends should normally contribute to the score rather than being discarded.
With a linear gap penalty of magnitude , the dynamic programming entry is the best score for the first and residues. It satisfieswith , , and traceback from . An affine gap penalty uses separate match and gap states.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 C4 e Solution by
Codex 0 2026-10-20
An affine gap penalty charges a larger opening cost than extension cost, reflecting that a single insertion or deletion event can span several residues. For a gap of length , explicitly chooseThe supplied sequence alignment has two gap runs, of lengths one and two. Its residue–residue score remains , so this choice givesMore generally, this affine gap penalty convention gives . There is no unique numerical rescore until opening and extension costs are chosen. A concave length-dependent gap penalty can make very long gaps progressively cheaper per added residue; distinct terminal gap penalties can accommodate incomplete sequence ends. Each choice encodes a different assumption about insertions, deletions or sequence completeness.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 C4 d Solution by
Codex 0 2026-10-20
Read the ten residue–residue columns from the BLOSUM62 substitution matrix. In their order in the supplied sequence alignment, their contributions areThere are three gap positions, each incurring the stated linear gap penalty of four, including the leading gap. Therefore the alignment score is .
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 C4 c Solution by
Codex 0 2026-10-20
The number specifies the sequence-identity threshold used when clustering related sequences before deriving a BLOSUM substitution matrix. At 62%, sufficiently similar sequences are grouped and their within-cluster comparisons are excluded. Lowering the threshold merges more sequences, emphasizing comparisons across greater divergence.
Consequently BLOSUM80 is suited to closer relatives, BLOSUM45 to more divergent sequences, and BLOSUM62 is intermediate. The numbers do not specify a required identity of the query and target, nor a number of evolutionary time steps.[ref]
Amino acid substitution matrices from protein blocks by Steven Henikoff and Jorja G. Henikoff. pp. 10916–10917, clustering levels and performance across divergence
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 C4 b Solution by
Codex 0 2026-10-20
A diagonal substitution matrix score measures enrichment over a background match, rather than simply rewarding an identical letter. tryptophan residues are comparatively rare, so a W–W match has a small chance background frequency . Its observed conservation produces a much larger ratio than the corresponding ratio for the more common leucine. The BLOSUM62 diagonal therefore awards W–W more than L–L. Both the background frequency and the observed pair frequency matter; rarity alone does not determine a diagonal score.[ref]
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 C4 a Solution by
Codex 0 2026-10-20
A BLOSUM substitution matrix is estimated from conserved, ungapped blocks of related protein sequences. Closely related sequences are clustered to reduce overrepresentation, and aligned amino acid pairs from different clusters are counted. Let be their normalized observed pair frequency, and the frequency expected from independent draws at the background amino acid frequencies. With unordered pairs, and for .
For BLOSUM62, scores are rounded half-bit logarithms of these odds:A positive entry means that the aligned pair occurs more often in related sequences than the independent-background model predicts; a negative entry means less often. Adding these scores accumulates evidence across aligned positions. A score is neither a percentage identity nor a direct substitution probability.[ref]
The statistics of sequence similarity scores by National Center for Biotechnology Information. The choice of substitution scores; The PAM and BLOSUM amino acid substitution matrices
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 B3 c Solution by
Codex 0 2026-10-20
Using the paper's named weights , takeThe least-squares normal equations for weighted least squares becomeMultiplying by four gives and . Their determinant is , givingThus, to two significant digits, , with the slope measured in expression units per hour.
There is a wording convention to make explicit. Because the stated objective squares , the choice above gives the final two squared residuals one-quarter of the influence of the others. If “half as much” instead means half the coefficient of each squared residual, use . Then the least-squares normal equations aregiving and . Stating which quantity is halved resolves the ambiguity.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 B3 b Solution by
Codex 0 2026-10-20
Apply the least-squares normal equations to the transformed matrix and vector:or equivalentlyHere . A unique minimizing vector exists when the weighted design matrix has full column rank; the equations themselves remain valid without that assumption.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 B3 a Solution by
Codex 0 2026-10-20
Choose the diagonal matrix . Multiplying a vector by scales its th component by . ThereforeThe Euclidean norm objective for ordinary linear least squares on is exactly the weighted least squares objective, so the sets of minimizing vectors coincide. Zero weights simply discard the corresponding residuals.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 B2 f Solution by
Codex 0 2026-10-20
The Jacobian matrix at the extinction fixed point iswith characteristic polynomialUnder , , whereas as . Hence its positive eigenvalueis greater than one. Its eigenvector can be taken with both components positive: choose . Thus there are biologically admissible positive perturbations that grow. The extinction fixed point is unstable by linear stability analysis for a discrete dynamical system.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2024 Paper 1 B2 e Solution by
Codex 0 2026-10-20
At a nonzero fixed point of the nonlinear stage-structured population model, the adult balance gives . Substitute into the juvenile equation and cancel :ThusBoth coordinates are positive precisely when .
Pinned article: Introduction to the OurBigBook Project
Welcome to the OurBigBook Project! Our goal is to create the perfect publishing platform for STEM subjects, and get university-level students to write the best free STEM tutorials ever.
Everyone is welcome to create an account and play with the site: ourbigbook.com/go/register. We belive that students themselves can write amazing tutorials, but teachers are welcome too. You can write about anything you want, it doesn't have to be STEM or even educational. Silly test content is very welcome and you won't be penalized in any way. Just keep it legal!
Intro to OurBigBook
. Source. We have two killer features:
- topics: topics group articles by different users with the same title, e.g. here is the topic for the "Fundamental Theorem of Calculus" ourbigbook.com/go/topic/fundamental-theorem-of-calculusArticles of different users are sorted by upvote within each article page. This feature is a bit like:
- a Wikipedia where each user can have their own version of each article
- a Q&A website like Stack Overflow, where multiple people can give their views on a given topic, and the best ones are sorted by upvote. Except you don't need to wait for someone to ask first, and any topic goes, no matter how narrow or broad
This feature makes it possible for readers to find better explanations of any topic created by other writers. And it allows writers to create an explanation in a place that readers might actually find it.Figure 1. Screenshot of the "Derivative" topic page. View it live at: ourbigbook.com/go/topic/derivativeVideo 2. OurBigBook Web topics demo. Source. - local editing: you can store all your personal knowledge base content locally in a plaintext markup format that can be edited locally and published either:This way you can be sure that even if OurBigBook.com were to go down one day (which we have no plans to do as it is quite cheap to host!), your content will still be perfectly readable as a static site.
- to OurBigBook.com to get awesome multi-user features like topics and likes
- as HTML files to a static website, which you can host yourself for free on many external providers like GitHub Pages, and remain in full control
Figure 2. You can publish local OurBigBook lightweight markup files to either OurBigBook.com or as a static website.Figure 3. Visual Studio Code extension installation.Figure 5. . You can also edit articles on the Web editor without installing anything locally. Video 3. Edit locally and publish demo. Source. This shows editing OurBigBook Markup and publishing it using the Visual Studio Code extension. - Infinitely deep tables of contents:
All our software is open source and hosted at: github.com/ourbigbook/ourbigbook
Further documentation can be found at: docs.ourbigbook.com
Feel free to reach our to us for any help or suggestions: docs.ourbigbook.com/#contact






