Stora Tentan in Bioinformatics
Reading guide for the oral PhD exam at DBB, Stockholm University
About this guide
This book is not complete. It is a study aid, meant to help you organise your preparation for the exam. We do not guarantee that it covers everything you need to know to pass Stora Tentan, and the exam is not limited to what is written here. Use it as a map of the field and a starting point for your own reading, together with the papers, textbooks and lectures it points to, and discussions with other students and your supervisor.
This is an early version of the book. Version 0.6.1 lists the classical papers in bioinformatics under Appendix C — Textbooks and general resources. Version 0.6 filled gaps found by a comparison with two classic textbooks (Pevsner; Zvelebil & Baum): new sections on human genetics (linkage disequilibrium, GWAS, fine-mapping, polygenic scores, diagnosing rare disease), regulatory and epigenomic sequencing, whole-genome alignment and conservation scores, pseudogenes, new genes and small proteins, and the experimental determination of function, a short introduction to information theory, and new subsections in most chapters. Version 0.5 integrated Matteo Tadiello’s companion textbook (review problems, figures and new text), and version 0.4 added a chapter on image analysis and models of cells (13 Image analysis and models of cells), which is not part of the 2025 exam description. The chapters and reading lists are open for comments from teachers and students: use the suggestion form (SU login).
This book collects reading material for Stora Tentan, the 15 hp oral exam in bioinformatics for PhD students at the Department of Biochemistry and Biophysics (DBB), Stockholm University. It is built on the current exam description (2025) and on the more detailed reading lists that were used in earlier years. It is not a course book: everything in it is chosen for one purpose, to help PhD students at DBB prepare for this exam.
What the exam is
Stora Tentan should show that a student awarded a PhD from DBB has a good basic knowledge of bioinformatics, wider than their own thesis area. The exam assumes the knowledge needed to pass the department’s advanced-level courses in bioinformatics and comparative genomics, but it is primarily a test of the ability to explain how bioinformatics methods are used to answer fundamental biological questions. Students are also expected to follow seminars and dissertations at DBB and SciLifeLab and to be aware of current international research.
- Two examiners, about two hours.
- No single required textbook. Zvelebil & Baum (Zvelebil and Baum 2008) or Pevsner (Pevsner 2015) cover most areas, but they are not up to date — you need to update your knowledge to the current state of the art (the proceedings of the last few ISMB and ECCB meetings are a good start).
- The exam is not about knowing every detail. You should be able to discuss and reason about methods: how they work (algorithms), their advantages and limitations, and when to use them.
- Fundamental knowledge of the algorithms and limitations of established methods for sequence searching, protein structure prediction, phylogeny and function annotation is required.
- Every exam is unique. Depending on how the first topic goes, other topics may be covered in more or less depth, or not at all.
Experience shows that discussing the exam with other PhD students is a very efficient way to prepare, and that online lectures often explain things better than textbooks.
Programming and reproducible research
Programming and reproducibility are general professional background, not a separate exam topic. You will not be asked to write code, and the topic chapters do not return to these practices in detail. But you are expected to know how computational research is done and to be able to discuss the tools and practices you use: examiners may ask how you would implement or scale an algorithm, or how someone else could reproduce one of your results.
What you should know
- Languages and their roles. Python and R for analysis, statistics and visualisation; the Unix shell for handling files and running programs; compiled languages (C, C++, Rust) for performance-critical tools such as aligners. Know why most heavy bioinformatics tools are written in compiled languages, while analyses are written in scripting languages.
- Algorithms and complexity. Big-O notation, and why an \(O(n^2)\) algorithm becomes unusable on a million sequences while an \(O(n \log n)\) one does not. Basic data structures (arrays, hash tables, trees, graphs) and the algorithmic ideas that recur in this book: dynamic programming (Dynamic programming and sequence alignment), hashing and indexing (Heuristic search methods), and graph algorithms (5 Genomics).
- Computing environments. Working on a Unix system and on a computer cluster with a job scheduler such as Slurm; when to use GPUs (mainly for deep learning); cloud computing and its cost.
- Version control. Using git for code and analyses, and platforms such as GitHub or GitLab for collaboration (Perez-Riverol et al. 2016).
- Reproducibility. Recording software versions and parameters; managing software environments (conda, containers such as Docker or Apptainer); using workflow managers such as Snakemake or Nextflow (Köster and Rahmann 2012; Di Tommaso et al. 2017); documenting analyses, for example in notebooks or Quarto/R Markdown documents. Sandve et al. (2013) and Wilson et al. (2017) give short, practical rules.
- Reproducible is not the same as correct. An analysis is reproducible if the same data and code give the same result, replicable if new data give the same conclusion, and robust if the conclusion survives other reasonable analysis choices. A perfectly reproducible analysis can still be wrong, for example because of data leakage or confounding (Basics). Containers record the software, but not the input data, the reference files or sources of randomness, which must be recorded separately.
- Data management. The FAIR principles (findable, accessible, interoperable, reusable) (Wilkinson et al. 2016); depositing data in public repositories (2 Databases); standard file formats (FASTA, FASTQ, SAM/BAM, VCF, PDB/mmCIF; see Table 1); handling sensitive human data in line with GDPR and ethical approvals.
- Testing and correctness. Checking code on small examples with known answers, and being sceptical of results that look too good. Many published errors come from simple bugs such as off-by-one errors, swapped sample labels or spreadsheet conversions of gene names to dates.
Common file formats
Most bioinformatics data are exchanged in a small number of community formats. You should know what each contains and what it is used for.
| Format | What it contains |
|---|---|
| FASTA | Sequences (nucleotide or protein), each with a header line starting with >; no quality information |
| FASTQ | Sequencing reads with a quality score for every base (Phred scale, encoded as characters), four lines per read |
| SAM / BAM / CRAM | Reads aligned to a reference: position, mapping quality, flags and a CIGAR string describing the alignment. SAM is text, BAM its compressed binary form, CRAM a smaller, reference-based compression |
| VCF (and binary BCF) | Variants: position, reference and alternative alleles, quality, filters, and the genotype of each sample |
| BED | Genomic intervals (chromosome, start, end, and optionally name, score and strand), for example peaks or target regions |
| GFF3 / GTF | Genome annotation: genes, transcripts, exons and coding sequences, with parent–child relations in an attribute column. GTF is an older variant used by Ensembl and GENCODE |
| PDB / mmCIF | Atomic coordinates of macromolecular structures. The legacy fixed-column PDB format cannot hold very large structures; PDBx/mmCIF is the archive standard |
HDF5, AnnData (.h5ad) |
HDF5 is a hierarchical binary container for large arrays. AnnData, built on it, stores a single-cell count matrix together with cell and gene annotations and embeddings |
| OME-Zarr | Chunked, cloud-friendly storage of large multidimensional images, for example microscopy and spatial omics, with standard metadata |
Coordinates differ between formats: BED (and BAM internally) counts from 0 with half-open intervals, whereas SAM, VCF and GFF count from 1 with closed intervals, so conversions are a classic source of off-by-one errors (2 Databases).
A provenance checklist
A computational result can only be reproduced if everything that produced it is recorded. For any analysis, you should be able to state:
- the data: accession numbers, and the release or date of every database used (a UniProt or Pfam release changes search results; see 2 Databases);
- the reference genome and annotation versions, for example GRCh38 with a specific GENCODE release, or the T2T or pangenome reference (5 Genomics);
- the software versions and all parameters, including thresholds and defaults that were left unchanged;
- random seeds, for anything stochastic: MCMC, clustering, UMAP, training of machine-learning models, structure prediction with several seeds;
- the computing environment: a conda environment file or a container image;
- the models: the versions or weights of trained models, and for AI tools the tool, model version, date and prompts (AI in research practice);
- the workflow: the scripts or workflow-manager pipeline that link these steps, under version control;
- where the code and data are deposited, so that others can rerun the analysis.
Reading
- Sandve et al. (2013) — ten simple rules for reproducible computational research.
- Wilson et al. (2017) — good enough practices in scientific computing.
- Software Carpentry lessons, for example the Unix shell, version control with git, and programming in Python or R.
Uncertainty: many numbers, different meanings
Almost every method in this book reports a number that expresses confidence in a result. They answer different questions and must not be confused, which is a frequent source of mistakes in oral exams. The table summarises the most important ones.
| Measure | What it is | Common misreading | See |
|---|---|---|---|
| E-value | Expected number of hits with at least this score by chance, for one query against this database | A probability; it grows with database size | Heuristic search methods |
| p-value | Probability of data at least as extreme as observed, if the null hypothesis is true | The probability that the null hypothesis is true | Statistical background |
| FDR | Expected proportion of false positives among the set of results called significant | The probability that one particular hit is false | Testing and statistics |
| q-value | For one result, the smallest FDR threshold at which it would be called significant | The FDR of that single result | Testing and statistics |
| Local FDR, posterior error probability | Probability that one particular result is false, under the model | Model-free; it is only as good as the model | Statistics and error control |
| Bootstrap support | Percentage of resampled data sets in which a clade is recovered | The probability that the clade is true | Statistical support |
| Posterior probability (Bayesian) | Probability of a clade or parameter given the data, the model and the priors | Independent of the model; it can be close to 1 for wrong clades if the model is wrong | Statistical support |
| pLDDT, PAE, ipTM | AlphaFold’s predicted error of local structure, relative positions and interfaces | Measured accuracy; confident predictions can still be wrong | Protein structure prediction |
| Classifier score | A model’s output for one example | A probability: it is one only if the model is calibrated, and it depends on how common positives are | Basics |
All of them are conditional on assumptions: the null model, the substitution model, the training data. A small number is not evidence by itself. It is evidence only together with the assumptions behind it.
Information theory in brief
Several quantities in this book come from information theory, founded by Shannon (Shannon 1948). With logarithms to base 2 they are measured in bits; with natural logarithms, as in most machine learning, in nats.
Entropy measures the uncertainty of a distribution \(p\) over symbols \(a\), or the average surprise \(-\log_2 p_a\) of an observation: \[ H(p) = -\sum_a p_a \log_2 p_a . \] It is the average number of yes/no questions needed to identify a symbol. A uniform distribution over the four nucleotides has 2 bits, over the 20 amino acids \(\log_2 20 \approx 4.3\) bits, and a fully conserved alignment column has 0 bits. A related quantity, the information content \(-\log_2 P(t)\) of a single event, weights rare, specific GO terms more than general ones in the evaluation of function prediction (Predicting the effects of mutations).
Relative entropy, or the Kullback–Leibler divergence (Kullback and Leibler 1951), measures how different a distribution \(p\) is from a reference \(q\): \[ D(p \,\|\, q) = \sum_a p_a \log_2 \frac{p_a}{q_a} . \] It is the average log-odds score \(\log_2 (p_a/q_a)\) when the data really come from \(p\). It is never negative, and zero only if \(p = q\), but it is not symmetric, so it is not a true distance. It appears twice in 1 Sequence searching. The relative entropy of a substitution matrix is the average score per aligned pair in true alignments, about 0.7 bits for BLOSUM62, and tells how long an alignment must be to stand out from chance (Dynamic programming and sequence alignment). The information content of a motif position is the relative entropy of the column with respect to the background, and is the height of a stack in a sequence logo (Profiles and multiple sequence alignments).
Mutual information measures how much knowing one variable reduces the uncertainty about another. It is the relative entropy between the joint distribution and the product of the marginals: \[ I(X;Y) = \sum_{x,y} p(x,y) \log_2 \frac{p(x,y)}{p(x)\,p(y)} . \] It is zero only if \(X\) and \(Y\) are independent, and unlike correlation it also detects non-linear dependence. Between two columns of an alignment it reveals covariation: base pairs in RNA (RNA homology search) and residue contacts in proteins (Protein evolution, Protein structure prediction), where global models are needed to separate direct from indirect couplings. It is also used to infer gene regulatory networks from expression data (Experimental methods). The relative entropy of a substitution matrix is itself the mutual information between the two residues of a true aligned pair.
Cross-entropy compares the true distribution \(p\) with a model’s predicted distribution \(q\): \[ H(p, q) = -\sum_a p_a \log q_a = H(p) + D(p \,\|\, q) . \] For a classifier, \(p\) puts all its weight on the true class \(y\), and the loss for one example is \(-\log q_y\), the negative log-likelihood of the correct answer. Minimising the average cross-entropy loss is therefore maximum likelihood, and since \(H(p)\) is fixed by the data, it also minimises the divergence of the model from the data (Basics).
Perplexity is the exponential of the cross-entropy, \(2^{H}\) in bits or \(e^{H}\) in nats. It is the effective number of equally likely choices the model is choosing between at each position: a uniform guess over the amino acids gives 20, and a perfect prediction gives 1. It is the usual measure of how well a protein language model predicts sequences (Protein language models).
Written for this book. For background, see the Wikipedia articles Entropy (information theory), Kullback–Leibler divergence, Mutual information, Cross-entropy and Perplexity.
How each chapter is organised
The thirteen topic chapters share the same structure:
- Overview — what the chapter covers and how it connects to the others.
- Sections — a full text on each part of the topic, written mainly from Wikipedia and other open sources (credited at the end of each section), with references to the key papers. Background that every student is expected to know, such as statistics, basic biochemistry and the use of AI tools, is included where it is needed: statistics in 7 Expression analysis, nucleic acids and cells in 6 Genomes, amino acids, energetics and enzymes in 9 Protein structure, and AI in research practice in 12 Machine learning.
- Key concepts — a checklist of things you should be able to explain.
- Recommended reading — about six papers to read in full, mostly from the reading lists of earlier years, each with a one-line note on why it matters.
- Background reading (open access) — overviews to get started, mostly Wikipedia articles and tutorials, each with a short description.
- Student recommendations — papers, online lectures, tutorials and exam experiences recommended by students. Students can send suggestions, including corrections and exam questions, through the suggestion form (SU login); the teachers review them and add the good ones in the next version.
- Review problems — problems that test understanding rather than recall, each with extensions, a solution outline and common errors (click to show them in the HTML version). They are adapted from the companion textbook by Matteo Tadiello (see below).
The papers are collected in appendices, so that the chapters stay readable:
Appendix A, Recommended reading (A.1–A.13, one section per chapter): the recommended papers with titles, abstracts, DOI and library links. In the PDF version the open-access papers follow in full.
Appendix B, Further papers (B.1–B.13): for each chapter, a longer list of papers grouped by theme, with titles, DOI links and abstracts (click Abstract in the HTML version). Papers marked ★ were mandatory in earlier reading lists.
Appendix D, Further explanations (D.1–D.13): for each section of a chapter, one to three open-access reviews, tutorials or textbook chapters that explain the topic in more detail than the book does, each with a short comment. In the PDF version one or two of them per chapter follow in full. Each section of the chapters points to its part of appendix D.
Appendix E, Wikipedia index (E.1–E.13): the main Wikipedia articles for each section, with a one-line description. They are a quick way to look up a term, not a source to cite.
Appendix F, Cross-topic problems and case studies: problems that combine several chapters, as questions in the oral exam often do, and two longer case studies.
Appendix C lists textbooks and general resources. Full references are collected in References; hover over a citation to see it.
Topics
| Topic | What is covered |
|---|---|
| Sequence searching | Alignment algorithms, substitution matrices, BLAST, profile HMMs, significance, MSA, motifs |
| Databases | Primary and derived databases, their hierarchy and relations |
| Evolution | Homology, orthology/paralogy and orthology databases, gene duplication, selection, drift |
| Phylogeny | Distance, parsimony, likelihood and Bayesian methods; models; support |
| Genomics | Sequencing technologies, assembly, read mapping, variant calling, gene prediction |
| Genomes | Prokaryotic vs. eukaryotic genome organisation, viral genomes, gene order and synteny, genome size and complexity |
| Expression analysis | Microarrays, RNA-seq, single-cell, normalisation, multiple testing |
| Proteomics | Mass spectrometry, peptide identification, quantification, FDR |
| Protein structure | Structure, domains, secondary/tertiary prediction, AlphaFold, design, docking |
| Protein function | Function definitions (GO), annotation transfer, localisation, variant effects |
| Protein–protein interactions | Experimental and computational PPI methods, networks, pathway and network enrichment |
| Machine learning | HMMs, neural networks, evaluation and overfitting, deep learning, language models, integrating data |
| Image analysis and models of cells | Bioimage analysis, segmentation and classification, Cell Painting, protein localisation, pathology, cell atlases, virtual and whole-cell models (not in the 2025 exam description) |
Earlier versions of the instructions
The reading lists from earlier years (in data/) contained a list of mandatory articles and a much longer list of background papers. These have been distributed over the topic chapters. A 2021 variant of the exam was instead based on Pevsner’s textbook (Pevsner 2015) together with the review by Sapoval et al. (2022); both remain excellent starting points.
Additional material
A lot of the material in this book is covered by the two bioinformatics courses given by Arne Elofsson (KB8029) and Erik Sonnhammer (KB8030). The course book for KB8029 can be found at https://course.bioinfo.se. The suggested course litterature for KB8030 is Zvelebil, M. J., Baum, J.O. (2007) Understanding Bioinformatics, Garland Science
Companion textbook and contributors
Matteo Tadiello, a student of Arne Elofsson, has written a companion textbook, Modern Bioinformatics: From Foundations to Frontiers (<https://bioinfo.se/teaching/modern-bioinformatics/>). It covers the same topics as a general textbook, in more depth and with more mathematics, and is a good next step after the summaries in this book. Each chapter here links to the matching chapters of his book. The review problems at the end of each chapter, the cross-topic problems and case studies in appendix F, many of the figures, and new text in most chapters are adapted from his book with his permission (CC BY 4.0). This includes the sections on orthology databases, gene order and synteny, viral genomes, pathway and network enrichment, and integrating data; every adapted part is credited where it appears.
Licence
This book is licensed under the Creative Commons Attribution-ShareAlike 4.0 International licence (CC BY-SA 4.0). Parts of the text are adapted from Wikipedia and other openly licensed sources, which are credited in each section. Included papers keep their own licences, and only openly licensed papers are reproduced in full. A private edition of the book (rendered with quarto render --profile private) also contains copyrighted papers; it is for students at DBB only and must not be distributed.