Preface

A student came to me some years ago with a hard disk of RNA-seq data and a deadline. She had been taught molecular biology thoroughly and had generated the samples herself. What she had not been taught was what to do with sixty gigabytes of compressed text. She had spent a fortnight trying to open a FASTQ file in a spreadsheet.

That gap — between producing biological data and being able to do anything with it — is the reason this book exists. It is a gap that has widened every year since high-throughput sequencing became routine. Sequencing a bacterial genome is now a service you can buy; interpreting it is not. The limiting reagent in a great deal of modern biology is no longer the experiment but the analysis.

The usual remedies have not worked well. Bioinformatics is often taught either as computer science with biological examples, which loses the biologists, or as a tour of web tools, which produces users who can click through an interface but cannot tell when its output is wrong. Neither approach produces someone who can take an unfamiliar dataset and make defensible sense of it.

This book takes a third approach, which is simply to do the work. Every concept is introduced because it is needed for a decision in an actual analysis. Every method is demonstrated on real data that comes with the book. Every piece of output you see was generated by the code printed above it, on the data described beside it. When a tool cannot be run inside the book, the command is shown as it was actually run, and its real output is quoted.

What this book assumes

It assumes you have seen the central dogma before and can be reminded rather than taught. It assumes no programming experience whatsoever. It assumes you have a computer with a terminal and the patience to type into it.

It does not assume you are a computer scientist, and it does not try to make you one. There is no complexity analysis here, and the algorithms are derived only to the depth that changes how you use them. There is, however, a sustained insistence on one point that is genuinely computational: that an analysis you cannot repeat is not a result. Scripts, environments, version control and recorded provenance appear from Chapter 1 and never go away.

What this book is not

It is not a reference manual. Tools change; the documentation for any one of them will be more current than this book by the time you read it. What is durable is the reasoning — why you align before you count, why a p-value from a genome-wide test needs correcting, why an annotation inherited from a homologue is a hypothesis. That reasoning is what I have tried to write down.

Nor is it a clinical text. Chapter 13 covers variant interpretation and pharmacogenomics because they are now part of the field, but patient-facing decisions belong to accredited laboratories and qualified clinicians, and the chapter says so.

A note on where this was written

Much of my own work has been done in settings where compute is shared, bandwidth is intermittent and software licences are out of reach. That shapes the book. Every tool used here is free and open source. Every dataset is small enough to download over a poor connection. Nothing requires a cluster, though Chapter 5 explains how to use one when you have access. Genomics will only be as global as its methods are accessible, and I have tried to write accordingly.

Acknowledgement of the reader

Bioinformatics rewards stubbornness more than talent. The first time an aligner fails with an error you have never seen, it will be tempting to conclude that you are not the sort of person who does this. You will be wrong. Everyone who works in this field spends a substantial fraction of their time confused, and the difference between those who continue and those who do not is mostly a willingness to read the error message carefully and try again.

Umar Ahmad Bauchi, Nigeria