100% found this document useful (7 votes)
150 views

Get Bioinformatics Algorithms An Active Learning Approach 2nd Edition Phillip Compeau PDF ebook with Full Chapters Now

Algorithms

Uploaded by

abadouferiti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (7 votes)
150 views

Get Bioinformatics Algorithms An Active Learning Approach 2nd Edition Phillip Compeau PDF ebook with Full Chapters Now

Algorithms

Uploaded by

abadouferiti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 51

Download Full ebookname - Read Now at ebookname.

com

Bioinformatics Algorithms An Active Learning


Approach 2nd Edition Phillip Compeau

https://ebookname.com/product/bioinformatics-algorithms-an-
active-learning-approach-2nd-edition-phillip-compeau/

OR CLICK BUTTON

DOWLOAD EBOOK

Discover More Ebook - Explore Now at ebookname.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

Child Development An Active Learning Approach 2nd Edition


Laura E. Levine

https://ebookname.com/product/child-development-an-active-learning-
approach-2nd-edition-laura-e-levine/

ebookname.com

Bioinformatics Databases and Algorithms 1st Edition N.


Gautham

https://ebookname.com/product/bioinformatics-databases-and-
algorithms-1st-edition-n-gautham/

ebookname.com

Bioinformatics Algorithms Techniques and Applications 1st


Edition Ion Mandoiu

https://ebookname.com/product/bioinformatics-algorithms-techniques-
and-applications-1st-edition-ion-mandoiu/

ebookname.com

Implementing Microsoft Azure Infrastructure Solutions Exam


Ref 70 533 1st Edition Washam M.

https://ebookname.com/product/implementing-microsoft-azure-
infrastructure-solutions-exam-ref-70-533-1st-edition-washam-m/

ebookname.com
Pulp Bleaching Today Green Sciences 1st Edition Hans
Ulrich Suess

https://ebookname.com/product/pulp-bleaching-today-green-sciences-1st-
edition-hans-ulrich-suess/

ebookname.com

Cortisol Physiology Regulation and Health Implications


Physiology Regulation and Health Implications 1st Edition
Alonzo Esposito
https://ebookname.com/product/cortisol-physiology-regulation-and-
health-implications-physiology-regulation-and-health-implications-1st-
edition-alonzo-esposito/
ebookname.com

Sentimental Tommy The Story of His Boyhood 1st Edition


James Matthew Barrie

https://ebookname.com/product/sentimental-tommy-the-story-of-his-
boyhood-1st-edition-james-matthew-barrie/

ebookname.com

Synthetic Biology A Primer Geoff Baldwin Et Al.

https://ebookname.com/product/synthetic-biology-a-primer-geoff-
baldwin-et-al/

ebookname.com

The reproduction of colour 6th Edition Hunt R.W.G

https://ebookname.com/product/the-reproduction-of-colour-6th-edition-
hunt-r-w-g/

ebookname.com
The Return of Nature On the Beyond of Sense John Sallis

https://ebookname.com/product/the-return-of-nature-on-the-beyond-of-
sense-john-sallis/

ebookname.com
Welcome!

Thank you for joining us! As you explore this book, you will find a number of active
learning components that help you learn the material at your own pace.

1. CODE CHALLENGES ask you to implement the algorithms that you will en-
counter (in any programming language you like). These code challenges are
hosted in the “Bioinformatics Textbook Track” location on Rosalind (http://
rosalind.info), a website that will automatically test your implementations.

2. CHARGING STATIONS provide additional insights on implementing the algo-


rithms you encounter. However, we suggest trying to solve a Code Challenge
before you visit a Charging Station.

3. EXERCISE BREAKS offer “just in time” assessments testing your understanding


of a topic before moving to the next one.

4. STOP and Think questions invite you to slow down and contemplate the current
material before continuing to the next topic.

5. DETOURS provide extra content that didn’t quite fit in the main text. DETOUR

6. FINAL CHALLENGES ask you to apply what you have learned to real experi-
mental datasets.

This textbook powers our popular online courses on Coursera. We encourage you
to sign up for a session and learn this material while interacting with thousands of
other talented students from around the world. You can also find lecture videos and
PowerPoint slides at the textbook website, http://bioinformaticsalgorithms.org.

i
Bioinformatics Algorithms:
An Active Learning Approach
2nd Edition, Vol. II

Phillip Compeau & Pavel Pevzner

http://bioinformaticsalgorithms.org

© 2015
Copyright © 2015 by Phillip Compeau and Pavel Pevzner. All rights reserved.

This book or any portion thereof may not be reproduced or used in any manner whatso-
ever without the express written permission of the publisher except for the use of brief
quotations in a book review.

Printed in the United States of America

First Printing, 2015

ISBN: 978-0-9903746-2-6

Library of Congress Control Number: 2015945208

Active Learning Publishers, LLC


9768 Claiborne Square
La Jolla, CA 92037
To my family. — P. C.

To my parents. — P. P.
In Case You Missed Volume I. . .

C HAPTER 1 C HAPTER 2

vi
C HAPTER 3 C HAPTER 4

C HAPTER 5 C HAPTER 6

vii
Volume II Overview

C HAPTER 7 — p. 2 C HAPTER 8 — p. 68

viii
CHAPTER 9 — p. 120 CHAPTER 10 — p. 178

CHAPTER 11 — p. 234

ix
Contents

List of Code Challenges xvii

About the Textbook xix


Meet the Authors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Meet the Development Team . . . . . . . . . . . . . . . . . . . . . . . . . . . . xx
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi

7 Which Animal Gave Us SARS? 2


The Fastest Outbreak . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Trouble at the Metropole Hotel . . . . . . . . . . . . . . . . . . . . . . . . 3
The evolution of SARS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Transforming Distance Matrices into Evolutionary Trees . . . . . . . . . . . . . 5
Constructing a distance matrix from coronavirus genomes . . . . . . . . 5
Evolutionary trees as graphs . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Distance-based phylogeny construction . . . . . . . . . . . . . . . . . . . 10
Toward An Algorithm for Distance-Based Phylogeny Construction . . . . . . 12
A quest for neighboring leaves . . . . . . . . . . . . . . . . . . . . . . . . 12
Computing limb lengths . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Additive Phylogeny . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Trimming the tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Attaching a limb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
An algorithm for distance-based phylogeny construction . . . . . . . . . 19
Constructing an evolutionary tree of coronaviruses . . . . . . . . . . . . 20
Using Least Squares to Construct Approximate Distance-Based Phylogenies . 22
Ultrametric Evolutionary Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
The Neighbor-Joining Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Transforming a distance matrix into a neighbor-joining matrix . . . . . . 27

x
Analyzing coronaviruses with the neighbor-joining algorithm . . . . . . 31
Limitations of distance-based approaches to evolutionary tree construction 33
Character-Based Tree Reconstruction . . . . . . . . . . . . . . . . . . . . . . . . 33
Character tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
From anatomical to genetic characters . . . . . . . . . . . . . . . . . . . . 34
How many times has evolution invented insect wings? . . . . . . . . . . 35
The Small Parsimony Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
The Large Parsimony Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Epilogue: Evolutionary Trees Fight Crime . . . . . . . . . . . . . . . . . . . . . 48
Detours . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
When did HIV jump from primates to humans? . . . . . . . . . . . . . . 51
Searching for a tree fitting a distance matrix . . . . . . . . . . . . . . . . . 51
The four point condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Did bats give us SARS? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Why does the neighbor-joining algorithm find neighboring leaves? . . . 56
Computing limb lengths in the neighbor-joining algorithm . . . . . . . . 61
Giant panda: bear or raccoon? . . . . . . . . . . . . . . . . . . . . . . . . . 62
Where did humans come from? . . . . . . . . . . . . . . . . . . . . . . . . 62
Bibliography Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

8 How Did Yeast Become a Wine Maker? 68


An Evolutionary History of Wine Making . . . . . . . . . . . . . . . . . . . . . 69
How long have we been addicted to alcohol? . . . . . . . . . . . . . . . . 69
The diauxic shift . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Identifying Genes Responsible for the Diauxic Shift . . . . . . . . . . . . . . . 70
Two evolutionary hypotheses with different fates . . . . . . . . . . . . . 70
Which yeast genes drive the diauxic shift? . . . . . . . . . . . . . . . . . . 71
Introduction to Clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Gene expression analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Clustering yeast genes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
The Good Clustering Principle . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Clustering as an Optimization Problem . . . . . . . . . . . . . . . . . . . . . . 78
Farthest First Traversal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
k-Means Clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Squared error distortion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
k-means clustering and the center of gravity . . . . . . . . . . . . . . . . . 83
The Lloyd Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

xi
From centers to clusters and back again . . . . . . . . . . . . . . . . . . . 85
Initializing the Lloyd algorithm . . . . . . . . . . . . . . . . . . . . . . . . 87
k-means++ Initializer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Clustering Genes Implicated in the Diauxic Shift . . . . . . . . . . . . . . . . . 89
Limitations of k-Means Clustering . . . . . . . . . . . . . . . . . . . . . . . . . 90
From Coin Flipping to k-Means Clustering . . . . . . . . . . . . . . . . . . . . 92
Flipping coins with unknown biases . . . . . . . . . . . . . . . . . . . . . 92
Where is the computational problem? . . . . . . . . . . . . . . . . . . . . 95
From coin flipping to the Lloyd algorithm . . . . . . . . . . . . . . . . . . 95
Return to clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Making Soft Decisions in Coin Flipping . . . . . . . . . . . . . . . . . . . . . . 97
Expectation maximization: the E-step . . . . . . . . . . . . . . . . . . . . 97
Expectation maximization: the M-step . . . . . . . . . . . . . . . . . . . . 99
The expectation maximization algorithm . . . . . . . . . . . . . . . . . . 100
Soft k-Means Clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Applying expectation maximization to clustering . . . . . . . . . . . . . 100
Centers to soft clusters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Soft clusters to centers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Hierarchical Clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Introduction to distance-based clustering . . . . . . . . . . . . . . . . . . 103
Inferring clusters from a tree . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Analyzing the diauxic shift with hierarchical clustering . . . . . . . . . . 108
Epilogue: Clustering Tumor Samples . . . . . . . . . . . . . . . . . . . . . . . . 109
Detours . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Whole genome duplication or a series of duplications? . . . . . . . . . . 111
Measuring gene expression . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Microarrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Proof of the Center of Gravity Theorem . . . . . . . . . . . . . . . . . . . 113
Transforming an expression matrix into a distance/similarity matrix . . 114
Clustering and corrupted cliques . . . . . . . . . . . . . . . . . . . . . . . 115
Bibliography Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

9 How Do We Locate Disease-Causing Mutations? 120


What Causes Ohdo Syndrome? . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Introduction to Multiple Pattern Matching . . . . . . . . . . . . . . . . . . . . . 122
Herding Patterns into a Trie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Constructing a trie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

xii
Applying the trie to multiple pattern matching . . . . . . . . . . . . . . . 125
Preprocessing the Genome Instead . . . . . . . . . . . . . . . . . . . . . . . . . 127
Introduction to suffix tries . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Using suffix tries for pattern matching . . . . . . . . . . . . . . . . . . . . 127
Suffix Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Suffix Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Constructing a suffix array . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Pattern matching with the suffix array . . . . . . . . . . . . . . . . . . . . 134
The Burrows-Wheeler Transform . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Genome compression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Constructing the Burrows-Wheeler transform . . . . . . . . . . . . . . . . 136
From repeats to runs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Inverting the Burrows-Wheeler Transform . . . . . . . . . . . . . . . . . . . . . 139
A first attempt at inverting the Burrows-Wheeler transform . . . . . . . 139
The First-Last Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Using the First-Last property to invert the Burrows-Wheeler transform . 144
Pattern Matching with the Burrows-Wheeler Transform . . . . . . . . . . . . . 147
A first attempt at Burrows-Wheeler pattern matching . . . . . . . . . . . 147
Moving backward through a pattern . . . . . . . . . . . . . . . . . . . . . 148
The Last-to-First mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
Speeding Up Burrows-Wheeler Pattern Matching . . . . . . . . . . . . . . . . 153
Substituting the Last-to-First mapping with count arrays . . . . . . . . . 153
Getting rid of the first column of the Burrows-Wheeler matrix . . . . . . 154
Where are the Matched Patterns? . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Burrows and Wheeler Set Up Checkpoints . . . . . . . . . . . . . . . . . . . . . 157
Epilogue: Mismatch-Tolerant Read Mapping . . . . . . . . . . . . . . . . . . . 159
Reducing approximate pattern matching to exact pattern matching . . . 159
BLAST: Comparing a sequence against a database . . . . . . . . . . . . . 160
Approximate pattern matching with the Burrows-Wheeler transform . . 162
Charging Stations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Constructing a suffix tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Solving the Longest Shared Substring Problem . . . . . . . . . . . . . . . 167
Partial suffix array construction . . . . . . . . . . . . . . . . . . . . . . . . 169
Detours . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
The reference human genome . . . . . . . . . . . . . . . . . . . . . . . . . 170
Rearrangements, insertions, and deletions in human genomes . . . . . . 170
The Aho-Corasick algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . 170

xiii
From suffix trees to suffix arrays . . . . . . . . . . . . . . . . . . . . . . . 171
From suffix arrays to suffix trees . . . . . . . . . . . . . . . . . . . . . . . 173
Binary search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Bibliography Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177

10 Why Have Biologists Still Not Developed an HIV Vaccine? 178


Classifying the HIV Phenotype . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
How does HIV evade the human immune system? . . . . . . . . . . . . . 179
Limitations of sequence alignment . . . . . . . . . . . . . . . . . . . . . . 181
Gambling with Yakuza . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Two Coins up the Dealer’s Sleeve . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Finding CG-Islands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Hidden Markov Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
From coin flipping to a Hidden Markov Model . . . . . . . . . . . . . . . 186
The HMM diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Reformulating the Casino Problem . . . . . . . . . . . . . . . . . . . . . . 188
The Decoding Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
The Viterbi graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
The Viterbi algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
How fast is the Viterbi algorithm? . . . . . . . . . . . . . . . . . . . . . . 195
Finding the Most Likely Outcome of an HMM . . . . . . . . . . . . . . . . . . 196
Profile HMMs for Sequence Alignment . . . . . . . . . . . . . . . . . . . . . . . 198
How do HMMs relate to sequence alignment? . . . . . . . . . . . . . . . 198
Building a profile HMM . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Transition and emission probabilities of a profile HMM . . . . . . . . . . 203
Classifying proteins with profile HMMs . . . . . . . . . . . . . . . . . . . . . . 207
Aligning a protein against a profile HMM . . . . . . . . . . . . . . . . . . 207
The return of pseudocounts . . . . . . . . . . . . . . . . . . . . . . . . . . 208
The troublesome silent states . . . . . . . . . . . . . . . . . . . . . . . . . 209
Are profile HMMs really all that useful? . . . . . . . . . . . . . . . . . . . 216
Learning the Parameters of an HMM . . . . . . . . . . . . . . . . . . . . . . . . 217
Estimating HMM parameters when the hidden path is known . . . . . . 217
Viterbi learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
Soft Decisions in Parameter Estimation . . . . . . . . . . . . . . . . . . . . . . . 221
The Soft Decoding Problem . . . . . . . . . . . . . . . . . . . . . . . . . . 221
The forward-backward algorithm . . . . . . . . . . . . . . . . . . . . . . . 222
Baum-Welch Learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225

xiv
The Many Faces of HMMs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Epilogue: Nature is a Tinkerer and not an Inventor . . . . . . . . . . . . . . . 227
Detours . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
The Red Queen Effect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
Glycosylation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
DNA methylation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
Conditional probability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
Bibliography Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232

11 Was T. rex Just a Big Chicken? 234


Paleontology Meets Computing . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Which Proteins Are Present in This Sample? . . . . . . . . . . . . . . . . . . . . 236
Decoding an Ideal Spectrum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
From Ideal to Real Spectra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Peptide Sequencing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Scoring peptides against spectra . . . . . . . . . . . . . . . . . . . . . . . 244
Where are the suffix peptides? . . . . . . . . . . . . . . . . . . . . . . . . . 246
Peptide sequencing algorithm . . . . . . . . . . . . . . . . . . . . . . . . . 248
Peptide Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
The Peptide Identification Problem . . . . . . . . . . . . . . . . . . . . . . 249
Identifying peptides in the unknown T. rex proteome . . . . . . . . . . . 250
Searching for peptide-spectrum matches . . . . . . . . . . . . . . . . . . . 251
Peptide Identification and the Infinite Monkey Theorem . . . . . . . . . . . . . 252
False discovery rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
The monkey and the typewriter . . . . . . . . . . . . . . . . . . . . . . . . 254
Statistical significance of a peptide-spectrum match . . . . . . . . . . . . 255
Spectral Dictionaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
T. rex Peptides: Contaminants or Treasure Trove of Ancient Proteins? . . . . . 261
The hemoglobin riddle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
The dinosaur DNA controversy . . . . . . . . . . . . . . . . . . . . . . . . 264
Epilogue: From Unmodified to Modified Peptides . . . . . . . . . . . . . . . . 264
Post-translational modifications . . . . . . . . . . . . . . . . . . . . . . . . 264
Searching for modifications as an alignment problem . . . . . . . . . . . 265
Building a Manhattan grid for spectral alignment . . . . . . . . . . . . . 267
Spectral alignment algorithm . . . . . . . . . . . . . . . . . . . . . . . . . 271
Detours . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
Gene prediction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273

xv
Finding all paths in a graph . . . . . . . . . . . . . . . . . . . . . . . . . . 274
The Anti-Symmetric Path Problem . . . . . . . . . . . . . . . . . . . . . . 275
Transforming spectra into spectral vectors . . . . . . . . . . . . . . . . . . 276
The infinite monkey theorem . . . . . . . . . . . . . . . . . . . . . . . . . 278
The probabilistic space of peptides in a spectral dictionary . . . . . . . . 278
Are terrestrial dinosaurs really the ancestors of birds? . . . . . . . . . . . 279
Solving the Most Likely Peptide Vector Problem . . . . . . . . . . . . . . 280
Selecting parameters for transforming spectra into spectral vectors . . . 281
Bibliography Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283

Bibliography 285

Image Courtesies 291

xvi
List of Code Challenges

Chapter 7 2
(7A) Compute Distances Between Leaves . . . . . . . . . . . . . . . . . . . . . 11
(7B) Compute Limb Lengths in a Tree . . . . . . . . . . . . . . . . . . . . . . . 17
(7C) Implement A DDITIVE P HYLOGENY . . . . . . . . . . . . . . . . . . . . . . 20
(7D) Implement UPGMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
(7E) Implement N EIGHBOR J OINING . . . . . . . . . . . . . . . . . . . . . . . 30
(7F) Implement S MALL PARSIMONY . . . . . . . . . . . . . . . . . . . . . . . . 40
(7G) Adapt S MALL PARSIMONY to Unrooted Trees . . . . . . . . . . . . . . . . 42
(7H) Find the Nearest Neighbors of a Tree . . . . . . . . . . . . . . . . . . . . . 45
(7I) Implement N EAREST N EIGHBOR I NTERCHANGE . . . . . . . . . . . . . . 47

Chapter 8 68
(8A) Implement FARTHEST F IRST T RAVERSAL . . . . . . . . . . . . . . . . . . 80
(8B) Compute the Squared Error Distortion . . . . . . . . . . . . . . . . . . . . 82
(8C) Implement the Lloyd Algorithm for k-Means Clustering . . . . . . . . . . 85
(8D) Implement the Soft k-Means Clustering Algorithm. . . . . . . . . . . . . 103
(8E) Implement H IERARCHICAL C LUSTERING . . . . . . . . . . . . . . . . . . 106

Chapter 9 120
(9A) Construct a Trie from a Collection of Patterns . . . . . . . . . . . . . . . . 124
(9B) Implement T RIE M ATCHING . . . . . . . . . . . . . . . . . . . . . . . . . 126
(9C) Construct the Suffix Tree of a String . . . . . . . . . . . . . . . . . . . . . 132
(9D) Find the Longest Repeat in a String . . . . . . . . . . . . . . . . . . . . . . 132
(9E) Find the Longest Substring Shared by Two Strings . . . . . . . . . . . . . 133
(9F) Find the Shortest Non-Shared Substring of Two Strings . . . . . . . . . . 133
(9G) Construct the Suffix Array of a String . . . . . . . . . . . . . . . . . . . . 133
(9H) Implement PATTERN M ATCHING W ITH S UFFIX A RRAY . . . . . . . . . . . 135

xvii
(9I) Construct the Burrows-Wheeler Transform of a String . . . . . . . . . . . 138
(9J) Reconstruct a String from its Burrows-Wheeler Transform . . . . . . . . 147
(9K) Generate the Last-to-First Mapping of a String . . . . . . . . . . . . . . . 151
(9L) Implement BWM ATCHING . . . . . . . . . . . . . . . . . . . . . . . . . . 151
(9M) Implement B ETTER BWM ATCHING . . . . . . . . . . . . . . . . . . . . . 156
(9N) Find All Occurrences of a Collection of Patterns in a String . . . . . . . . 158
(9O) Find All Approximate Occurrences of a Collection of Patterns in a String 162
(9P) Implement T REE C OLORING . . . . . . . . . . . . . . . . . . . . . . . . . 169
(9Q) Construct the Partial Suffix Array of a String . . . . . . . . . . . . . . . . 169
(9R) Construct a Suffix Tree from a Suffix Array . . . . . . . . . . . . . . . . . 172

Chapter 10 178
(10A) Compute the Probability of a Hidden Path . . . . . . . . . . . . . . . . . 190
(10B) Compute the Probability of an Outcome Given a Hidden Path . . . . . 191
(10C) Implement the Viterbi Algorithm . . . . . . . . . . . . . . . . . . . . . . 195
(10D) Compute the Probability of a String Emitted by an HMM . . . . . . . . 197
(10E) Construct a Profile HMM . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
(10F) Construct a Profile HMM with Pseudocounts . . . . . . . . . . . . . . . 209
(10G) Perform a Multiple Sequence Alignment with a Profile HMM . . . . . . 212
(10H) Estimate the Parameters of an HMM . . . . . . . . . . . . . . . . . . . . 219
(10I) Implement Viterbi Learning . . . . . . . . . . . . . . . . . . . . . . . . . 220
(10J) Solve the Soft Decoding Problem . . . . . . . . . . . . . . . . . . . . . . 223
(10K) Implement Baum-Welch Learning . . . . . . . . . . . . . . . . . . . . . . 226

Chapter 11 234
(11A) Construct the Graph of a Spectrum . . . . . . . . . . . . . . . . . . . . . 239
(11B) Implement D ECODING I DEAL S PECTRUM . . . . . . . . . . . . . . . . . 240
(11C) Convert a Peptide into a Peptide Vector . . . . . . . . . . . . . . . . . . 245
(11D) Convert a Peptide Vector into a Peptide . . . . . . . . . . . . . . . . . . 245
(11E) Sequence a Peptide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
(11F) Find a Highest-Scoring Peptide in a Proteome against a Spectrum . . . 250
(11G) Implement PSMS EARCH . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
(11H) Compute the Size of a Spectral Dictionary . . . . . . . . . . . . . . . . . 258
(11I) Compute the Probability of a Spectral Dictionary . . . . . . . . . . . . . 260
(11J) Find a Highest-Scoring Modified Peptide against a Spectrum . . . . . . 273

xviii
About the Textbook

Meet the Authors

P HILLIP C OMPEAU is an Assistant Teaching Professor in the Compu-


tational Biology Department at Carnegie Mellon University. He is a
former postdoctoral researcher in the Department of Computer Sci-
ence & Engineering at the University of California, San Diego, where
he received a Ph. D. in mathematics. He is passionate about the future
of both offline and online education, having cofounded Rosalind with
Nikolay Vyahhi in 2012. A retired tennis player, he dreams of one day
going pro in golf.

PAVEL P EVZNER is Ronald R. Taylor Professor of Computer Science


at the University of California, San Diego. He holds a Ph. D. from
Moscow Institute of Physics and Technology, Russia and an Hon-
orary Degree from Simon Fraser University. He is a Howard Hughes
Medical Institute Professor (2006), an Association for Computing Ma-
chinery Fellow (2010), and an International Society for Computational
Biology Fellow (2012). He has authored the textbooks Computational
Molecular Biology: An Algorithmic Approach (2000) and An Introduction
to Bioinformatics Algorithms (2004) (jointly with Neil Jones).

xix
Meet the Development Team

V U N GO is a Ph. D student in Bioinformatics and Systems Biology at


UCSD. He holds a B. S in Biotechnology from Rutgers University. His
research interests include epigenetics, gene regulatory networks, and
machine learning algorithms. Outside of research, Vu enjoys movies,
music and badminton.

M AX S HEN is a student in the Computational and Systems Biology


Ph. D. program at the Massachusetts Institute of Technology, having re-
ceived a B. S. from UCSD. He is excited about the ways algorithms and
machine learning are applied in bioinformatics. Outside of research,
Max enjoys hip hop dance and playing video games competitively.

J EFFREY Y UAN is a graduate student in the Bioinformatics and Sys-


tems Biology Program at UCSD. He holds a Sc. B. in Computational
Biology from Brown University. His research interests include genome
assembly with long reads, the 3-dimensional organization of genome
structure, and genomic variation. Outside of research, Jeffrey enjoys
reading, board games, and volleyball.

xx
Acknowledgments

This textbook was greatly improved by the efforts of a large number of individuals, to
whom we owe a debt of gratitude.
The development team (Vu Ngo, Max Shen, and Jeffrey Yuan), as well as Ksenia
Krasheninnikova, implemented coding challenges and exercises, rendered figures,
helped typeset the text, and offered insightful feedback on the manuscript.
Glenn Tesler provided thorough chapter reviews and caught many errors in our
manuscript.
Sangtae Kim, Seungjin Na, Mihai Pop, and Héctor Corrada Bravo provided many
thoughtful comments. Sangtae and Seungjin also generated some images used in the
book.
Randall Christopher brought to life our ideas for illustrations in addition to the
textbook cover.
Nikolay Vyahhi led a team composed of Andrey Balandin, Artem Suschev, Aleksey
Kladov, and Kirill Shikhanov, who worked hard to support an online, interactive version
of this textbook used in our online course on Coursera.
Laurence Bernstein and Kai Zhang worked to implement many of the problems in
Chapter 9.
Our students on Coursera, especially Mark Mammel and Erika Ramírez, found
hundreds of typos in our preliminary manuscript.
Howard Hughes Medical Institute, the Russian Ministry of Education and Science,
and the National Institutes of Health generously gave their support for the development
of the online course based on this textbook. The Bioinformatics and Systems Biology
Program and the Computer Science & Engineering Department at the University of
California, San Diego provided additional support.
Finally, our families gracefully endured the many long days and nights that we
spent poring over manuscripts, and they helped us preserve our sanity along the way.

P. C. and P. P.
San Diego
July 2015

xxi
Random documents with unrelated
content Scribd suggests to you:
precaution, for an early night moth or two, lured by the prematurely
warm weather, had already made its appearance. Then he turned on
the light resolutely and started to undress. The suit he was wearing
was of dark blue serge with a white pin-head stripe, and as he
divested himself of it a new thought sprang up to his mind. Suppose
it, too, bore traces——? That head with its shattered, gaping wound
had rested against his knee. . . .
Seizing the garments he moved close to the bed-stand, and
beneath the powerful rays of the lamp he examined every thread
with straining eyes. No stain was visible; even his shirt cuffs by a
miracle had escaped contact, and with a sigh of relief he plunged his
hands in the various pockets to remove his keys and small change.
The first object his fingers touched was the burnt match with
which he had ignited the spirit lamp, and impatiently he filliped it out
of the window.
Everything was there in his pockets which he normally carried
except his handkerchief. That was gone, reduced to ashes and flung
to the winds of the night; but it would not have been had his
homecoming been as he must pretend even to himself.
Storm frowned. He would in all likelihood never wear that suit
again; even if it were not for the fact that mourning garb alone must
be his for many months to come, he could still never look upon it
again, remembering . . . .
He thrust that thought violently aside and continued with his
reasoning. Agnes always went through the pockets of the clothes he
had worn during the week for stray handkerchiefs when she was
collecting the laundry. Would she note that he had used one less
than usual?
It was not so much the fear of that, however, as the mental urge
to play up to his part, to make all things seem as though that hour in
the den had never been, that prompted Storm to go to his dresser
and take a fresh handkerchief from the drawer. Without effeminacy,
his fastidious taste inclined toward a dash of delicate scent, and
several varieties stood before him.
Tentatively he lifted a bottle of rose toilet water, but the first whiff
of fragrance made him replace it with a shudder. It brought back too
vividly the remembrance of that garden below where the opening
buds were even now scattered with filmy ashes. The lilac water he
also thrust aside—Leila had met him at the gate only a week before
with her arms filled with white lilac, and as she stood there, her head
looming fair and golden above them, he had thought her very like a
picture of the Annunciation . . . .
Finally he sprayed a few drops of eau de Cologne on the
handkerchief and stuffed it in the pocket of his coat lying across the
chair. Then, clad in his pajamas, he glanced at the clock on the
mantel.
Half-past twelve! It would be half-past six in the ordinary course
of events when Agnes would descend to dust the first floor and set
the breakfast table. Six hours to wait! Three hundred and sixty slow,
dragging minutes! How could he ever live through them? How did
the condemned spend the last hours before the end? He had read,
marveling, that some hardy criminals slept unconcernedly, some
raved, some prayed . . . .
God, why did such hideous thoughts intrude themselves now? He
would never stand in their shoes, no breath of suspicion would ever
approach him; he had laid his plans too well, had fortified himself
against any contingency which might arise. The scene had been
perfectly staged with not a detail missing to break the continuity of
the version of what had occurred which must impress itself upon
those who would view it.
Crossing the room, he seated himself on the side of the bed and
lighted a cigarette. He could keep the light going a little longer
without occasioning remark should one of the maids wake up, for he
had often read until past one. He must not overdo it, though; he must
not overdo anything. That would be the one great danger; he must
hold himself impervious against self-betrayal.
He smoked cigarette after cigarette until a single stroke tinkled
from the little clock, and, rousing himself from his reverie, Storm
reached over and extinguished the lamp. The darkness seemed
sinister, overwhelming, but as his eyes gradually accustomed
themselves to it he saw pale, silvery moonbeams creeping in
between the slats of the shutters, lying in shimmering bars across
the floor and lightening the gloom with a faint, almost spiritual
effulgence. The stillness of the night, too, was all at once broken by
a myriad sounds which had not penetrated his consciousness
before: strange creaks and groans in the walls as though something
invisible were abroad, sibilant whispers in the chimney and the liquid,
monotonous tap of water dripping from the faucet in the bathroom.
Outside, the wind blew gustily, and somewhere about the house a
loose shutter banged with a dismal, hollow sound.
What a hideous thing night was! There was something about it
which loosened a fellow’s thoughts, freed them from his stern control
and let them wander where they would, unrestrained. Only one other
such vigil had Storm kept: that of the crisis in Leila’s desperate
illness after their marriage. Every hour of it was branded on his brain,
every detail arose again to attack his senses: the pungent,
penetrating odor of carbolic, that strange, high voice which babbled
and was still, the white-clad nurse, gravely noncommittal, shutting
the door behind which he might not pass, the taste of his own blood
as he caught his lip between his teeth to keep back the groan of utter
despair.
The night then had seemed interminable, but in the end had
come the glorious promise that she would live! Now the dawn would
bring only tidings of death, but he would not call her back again if he
could; would not undo what he had done even if it lay in his power.
His Leila had never existed; the pedestal was empty, that was all!
Gad, if only he could smoke! His nerves shrieked for the solace
of nicotine, but he dared not light another cigarette. The smoke
curling up from his opened window to that of one of the maids
upstairs would tell her, should she also be awake, that her master
was keeping vigil there in the darkness alone. She would think
nothing of it now, perhaps, but later when the discovery was made
she might wonder. He must manage, somehow, to get through the
night without even the slight comfort that he craved!
With a whirring of soft wings, some tiny creature of the night
came and beat upon the shutter, and Storm started violently. The
bars of moonlight had traveled a barely perceptible inch or two
across the floor, and from the distance there came the crowning note
of desolation: the long-drawn, mournful howling of a dog.
Storm shivered. An old superstition which his Irish nurse had
instilled into his mind in the nursery days swept over him. A dog’s
howl was the sign of death! How could the beast know? In all that
sleeping countryside, there was one who shared his vigil, one who
raised his voice in warning and lament!
Storm rose and, tiptoeing to the window, opened the shutters
wide and fastened them noiselessly back against the house wall
while he strained his eyes in the direction from which the dismal
baying of the dog rose once more. Was it nearer now? Could it be
that the beast, led by some instinct more subtle and unerring than
man could fathom, had picked up the scent—the scent of the drifting
ashes? Bridget had told him that a dog could sense the presence of
death though it were miles away and would come to cry the news of
it. What if the creature were to appear suddenly there between the
trees and leap across the lawn to crouch beneath the curtained
window of the den downstairs and howl its dread message?
The next minute Storm’s tense attitude relaxed. What a fool he
was to be stirred by the idle superstition of an old-wives’ tale! His
nerves must be going back on him, what with that accursed howling
and the shifting shadows of the moonlight which were worse than
utter darkness could be. Would it never end?
As if in answer the mellow chime of the clock sounded upon his
ears. It must be three o’clock at least, possibly four——! He waited
breathlessly. A second note pealed forth softly to die away in a
vibrating echo, and then silence. Only two o’clock! Nearly five hours
more! God, could he endure it and keep his sanity? Doyle’s
gruesome story of Lady Sannox came to his mind. Would he be
found in the morning as the great physician had been after the night
of horror, a gibbering idiot trying to thrust both feet into one leg of his
trousers and babbling meaninglessly? Lady Sannox had been
unfaithful, too, but it was the lover, not the husband, who paid!
He forced the hideous picture from his thoughts and turned for
one final glance at the garden below. How still everything was! The
howling of the dog had ceased, and the wind had died down to a
mere rustling, whispering breeze. The moonlight, too, was paling,
and beneath its waning radiance the garden still slumbered
undisturbed as it had when he cast the ashes forth upon the air.
From these ashes would spring the phoenix, not of love, but of
murder; of hatred, vengeance and the lust to kill! What had he not
loosed upon the world!
He covered his eyes as if to shut out the scene of false peace, of
menacing, brooding calm before the crimson dawn; and staggering
back to the bed, he sank down upon it once more. The touch of the
smooth, cool linen beneath his fevered hand steadied him and
brought a moment of tranquility to his reeling senses, but he could
not stretch himself out upon it. The space beside him where Leila
had so often lain was blank and empty, yet oddly her presence
seemed near. He could almost hear her light tap upon the
connecting door, almost see it open and her slender, white-clad form
appear with the two heavy ropes of golden hair falling over her
shoulders. She would come to him swiftly, tenderly, and he would
take her in his arms and hold her close . . . .
But no tapping came upon the door, no form appeared, his arms
were empty! Great God, why could he not forget!
The clock struck three, the moonlight faded and vanished,
swallowed up in the darkest hour which comes before the dawn, and
still Storm crouched there at the bed’s foot sunk in a reverie of
retrospection.
In just such another springtime as this they had gone upon their
honeymoon. The awe and ecstasy of those days like a half-forgotten
fragrance stole again over his spirit and thrilled him anew. How
wonderful she had been, how wondrously sweet her shy
confidences, her little outbursts of tenderness, her bewitching,
bewildering changes of mood! How he reveled in each new phase of
her nature as it revealed itself to him; how he had worshipped her,
gloried in the possession of her! In the golden years that followed,
the first ecstasy had not faded; it had but stabilized, deepened into a
steady glow of unquestioning devotion, and the honeymoon had
never really ended until this hour!
Impotently he struck his forehead with his clenched fist. Why
must he go on thinking, thinking! The past was dead, buried beyond
hope of resurrection! Why must it come trooping back to rob him of
his strength and lull him to forgetfulness of the immediate future and
the crisis which impended? The night had been years long! Would it
never come to an end? Would this hideous darkness envelop him
forever?
Four o’clock! Thank God, he had missed an hour! Only two more
now, or three at the most, and then the cry of alarm would come
winging up from below and the curtain would rise!
A chill dampness as of the grave itself stole in at the window, and
Storm shivered although he was bathed in sweat. His pulse slowed
and weakness descended upon him, while a swift, unnerving fear
laid its clammy hands upon his throat.
He fought it off desperately. This was the dreaded hour before
the dawn, the hour of lowered vitality when life’s guard is down and
death stalks in upon those awaiting it, those whose time has come
and who slip out into the unknown quietly, peacefully. But for those
who are hurled into it suddenly, hideously, by shot or stab or crashing
blow——!
He dropped his wretched head upon his hands. This was
madness! He must not succumb to it, he must marshal his
resources, steady his brain, gather strength for the coming of day!
Slowly, almost imperceptibly, the darkness was changing from
black to gray. The eastern sky was unbroken, but a mist which could
rather be felt than seen was rising from the darker shadows, and the
wind had been succeeded by a dead calm. A hushed expectancy
seemed to brood over the world, and Storm waited, too, dreading yet
longing for the end of this prolonged suspense.
The clock ticked with maddening precision, and he tried to count
the minutes, to keep his traitorous thoughts from wandering into
dangerous, forbidden channels. His weakness had fallen from him,
his pulse quickened and a mounting excitement drove from him all
thought of fear. He would be ready when the time came to meet the
issue. But would the time ever come?
There were faint gray streaks in the sky now, the shadows had
sharpened and suddenly, piercingly, a cock crew. Storm welcomed
the strident sound with uplifted head and squared shoulders. The
dawn was coming at last!
He turned, crossed his arms on the foot of the bed and, resting
his chin upon them, stared out through the open window at the
lightening sky.
Five liquid, mellow notes sounded from the mantel, and he smiled
grimly. One hour more and he could begin to listen for the maid’s
step upon the stair! His nerves were tingling in anticipation, and
without urging his thoughts leaped ahead. He must be ready when
the cry came, but not too obviously prepared. Surprise must come
before alarm, consternation before a show of grief. The maid herself
must lead him to her discovery. His face and manner must reveal no
slightest inkling of his knowledge of the truth.
Both of the servants were undeniably stupid. He had
anathematized them many a time for their crass density and
ignorance, but now he blessed it. They would suspect nothing, would
seize upon any explanation of the tragedy which was subtly planted
in their shallow brains and make it their own.
Of the outsiders, Carr must be called in first. He was a country
practitioner of the old-fashioned sort who had been established there
when Greenlea was known as Whigham’s Corners, and croup and
gout with their intermediate ills had been the range of his experience.
He, too, could be counted upon to see only what was placed before
him, and the details of the aftermath could safely be left in his hands.
A score of vague, anticipatory visions passed through Storm’s
brain. How shocked the crowd out here would be; and old George!
He was probably fast asleep now, filling the air with contented
snores. What would he say and do when the early edition of the
evening papers brought the tidings to him? Storm thanked heaven
that neither he nor Leila had relatives to come flocking with tears and
questions and advice. He would be free at least from prying eyes
beneath his own roof after the official medical inquiry had been
concluded.
Gray turned to rose in the eastern sky, the mist lifted, and the
world showed delicately green beneath it. The lone cock’s crowing
had been augmented by a chorus, and the birds stirred and twittered
in the trees. All life was waking to greet the new day, but Leila. . . .
What time was it? Storm rose weakly and tottered to the mantel.
The clock’s face was plainly visible in the half-light, and he drew his
breath sharply. Five minutes to six!
The pink glow deepened to crimson, and the sun in a blaze of
glory peeped over the low-lying hills, but Storm did not see the
spectacle for which he had waited through interminable tortured
hours. He had caught a glimpse of his reflection in the mirror and
stood gazing in incredulous dismay at the face which gazed back at
him. Could it be his own with that sickly, bluish pallor, unshaven jaw,
and haunted, sunken eyes which stared from dark-rimmed sockets?
Great heavens, if he appeared like that before even the servants
his guilt would be patent to all the world!—But would it? The maids
would surely be too agitated to note him in the shock of the
discovery; and later, when the doctor came, horror and natural grief
would account for the change in his appearance. His night of vigil
had provided him with that which would perhaps be an asset rather
than a danger.
What was that? He whirled about and stood listening. The floors
and ceilings were thick, and no ordinary sound could penetrate from
above; but had he not heard a step upon the stair? He waited in an
intensity of strained attention, for several moments. The silence
within the house remained unbroken.
With a sigh he glanced back at the clock. It must have struck the
hour while he stood glaring at the apparition the mirror had revealed,
for now the hands pointed to a quarter after six. Could it be that
perverse fate would ordain that the maids should over-sleep this day
of all days and prolong his agony?
Then his glance fell upon the bed. Its pillows were smooth and
untouched, its covers creased but not tumbled about. The veriest
child could see that it had not been slept in, the most casual glance
would reveal the secret of his night-long vigil!
In three strides he had reached it and thrown back the covers,
pommeling the pillows and crumpling the sheets. What a narrow
escape! He paused, breathless, when his task was completed and
gazed fearfully about him for other overlooked evidence.
His light had been burning until one o’clock. Hastily he picked up
a book at random from those on the table and opening it laid it face
downward upon the bed-stand. The stubs and ashes of the
cigarettes he had smoked would occasion no remark; and the most
painstakingly minute scrutiny failed to reveal any other incongruity in
the room.
While he paused anew a sound came to his ears about which
there could be no doubt; cautious but naturally heavy footsteps were
descending the stairs from above. His heart leaped, and the blood
raced in his veins, but he stood motionless as the steps passed his
door and descended again.
It would come now, the cry for which he had waited! He held his
breath until his ear-drums seemed bursting, and the minutes
lengthened, but still the summons did not come. What could the girl
be doing? Would she set all the other rooms to rights before
approaching the den, or did she mean to shirk it altogether? Surely
that streak of artificial light burning in the daytime must catch her eye
as she passed along the hall! Was she gossiping with the milkman,
idling on the porch? The suspense was unbearable!
He had borne with it through the long watches of the night, but
now he could contain himself no longer. Every nerve was strained to
the breaking point, and his nails bit into the flesh of his clenched
hands. Was this agony to be stretched out interminably?
And then it came at last! A piercing, prolonged scream rang
suddenly through the quiet house, to break and rise again, echoing
back from the very walls.
Storm dropped his head in his hands, and an answering cry of
unconscious blasphemy trembled on his lips.
“Thank God!”
Chapter V.
When Morning Dawned
While Storm hesitated, relaxed in that moment of utter abandon
to relief, it came again; a wild shriek mounting from below in a high
feminine voice and dying away in a quivering wail!
The long awaited discovery had come; now he must play his part.
One false move!——But he put that resolutely from his thoughts as
he flung his dressing gown about him and started for the door.
“What is it? What has happened?” He was leaning Over the stair-
rail now, and his voice, although subdued, held just the proper note
of sharp inquiry. Even as he spoke he heard a heavy foot along the
hall above and was conscious of the cook’s head peering down
affrightedly.
“Oh, Mr. Storm, sir! Mr. Storm!”
Agnes, the housemaid, sped along the lower hall and collapsed
at the foot of the stairs.
“Well, what is it?” Storm demanded peremptorily, but still in that
subdued tone. “Burglars here in the night? Don’t you know better
than to scream like that? You’ll frighten Mrs. Storm——”
He paused, and the girl’s shocked wail arose once more.
“Mrs. Storm! She’s down here, sir, in the den. Oh, come quick!”
“Down——!”
The word died in Storm’s throat, and still conscious of the cook’s
eyes he turned, dashed open the door of his wife’s empty room,
uttered a loud ejaculation and then plunged down the stairs.
“I thought she was asleep in her room!” he exclaimed. “Where
——?”
“In the den, sir!” Agnes scrambled to her feet and stood clinging
to the newel post as Storm passed her and rushed down the hall.
“Oh, may God have mercy——!”
He heard a startled cry from above and lumbering feet hastily
descended the stairs as he burst into the den and then stopped
short. Leila’s body was lying face upward now upon the rug, her
waxen features clamped in the rigidity of marble, a hideous brown
clot enmeshing the soft gold of her hair and smeared across her
forehead.
The cry of horror which burst from Storm’s lips was not all
simulation, for anticipated as it was, the sight brought a sickening
qualm to him. He had conquered it the next moment, however, and
crossing to the body knelt and forced himself to touch it, to raise it
until it rested against his knee just as he had done the moment the
blow was struck. It was cold and stiff, the neck rigid, the eyes half
open and unwinking in their stare.
As the trembling servants appeared in the doorway he laid the
body gently back upon the rug and, rising, dashed his hand across
his eyes. He remembered that gesture; he had often seen a favorite
tragedian use it upon the stage.
“She is dead!” Horror, grief unutterable rang in his tones, and the
maids began to sob hysterically.
Without seeming to note their presence Storm staggered past
them to the telephone in the library.
“Greenlea 42 . . . . Dr. Carr, please . . . . Doctor, this is Storm,
Norman Storm. For God’s sake get over here as quickly as you
can! . . . . No, I can’t go into details, but it’s a matter of life and
death! . . . . All right, hurry, man!”
For a moment he sat there hunched over the silent instrument
while the sweat poured in rivulets down his face. So far, so good. His
shaking nerves were aiding him in the rôle he was playing, but he
must not let them get the upper hand.
The early morning sun streamed in at the long French windows
which opened on the veranda, and the twitter and chirp of birds
came to him from the lawn outside, mingling with the muffled wail
from the rear. He must go back. God! If only it were all over!
Agnes had collapsed again in a little heap in the den doorway,
but Ellen, the cook, knelt by the body, crooning pitifully over it as
Storm reentered. She made a grotesque figure clad only in the
blanket which she had thrown over her voluminous nightgown, her
iron-gray hair screwed back in a tight knob and tears streaming
down her round, honest face.
“Oh, sir!” She looked up, her eyes tragic with horror. “Who in the
world did it, sir?”
Storm started. A suspicion of murder already, and from the
source which he had least anticipated! If stupid, unimaginative Ellen
had leaped to such a conclusion could he hope after all that the truth
would not reveal itself to Dr. Carr and the authorities? He moistened
his lips with his tongue and stammered:
“She—she must have fallen—one of those fainting spells. It looks
as though she had struck her head on the fender, there.” He added
quickly, “When I came home late I supposed Mrs. Storm was asleep
in her room and did not disturb her. How did she come to be here?”
“Must have been waiting up for you, sir.” Agnes lifted her head
from her hands. “The mistress didn’t expect you home for dinner,
and I served her on the little table out on the veranda. She was
sitting out there still when Ellen and me went to bed, along about
nine. I asked her should I wait to lock up or see if you wanted a bit of
cold supper, sir, but she said no, that she would attend to it herself. If
only I’d known one of those attacks was coming on I wouldn’t have
left her for a minute! I’ll never forgive myself! But the mistress
seemed all right, as ever she was in her life, and I was that tired——”
Storm eyed her steadily:
“You would have heard Mrs. Storm had she called for help?”
“I don’t know, sir.” The girl twisted her hands. “I’m a pretty heavy
sleeper, and I never heard a thing during the night. I’ll never forget
the turn it gave me when I came down this morning and found the
light still on and her lying there on the floor——”
“God rest her soul!” Ellen ejaculated piously. “Sure we wouldn’t
have heard, away up there on the top floor at the back, unless she’d
screamed fit to wake the dead. I’d had a full day’s ironing, and I was
asleep the minute my head touched the pillow. The first I knew was
when Agnes here let that yell out of her awhile back. The best lady
ever I worked for and the kindest! She must have been took sudden
to fall over like that!”
Storm drew a breath of relief. It was evident that they were telling
the truth and that neither of them was aware of Brewster’s visit on
the previous night, nor had an inkling of its aftermath. He sank into a
chair and buried his face in his hands, the better to think. He must
get rid of them some way; their chatter and lamentations were
driving him mad!
“ ’Tis God’s will, sir,” Ellen ventured, in a hesitating effort at
consolation, though the tears still coursed unchecked down her
cheeks. “Couldn’t we move her, sir? ’Tis terrible to leave her lying
here, poor lady——”
“Not until the doctor comes.” Storm’s tones were hoarse and
muffled. “Please go away, both of you. I want to be alone. Mind you
say not a word of what has happened to the milkman or anyone else
who may come to the door until the doctor has taken charge. We
should have all the neighbors about our ears.”
“We won’t breathe a word.” Agnes scrambled to her feet. “You’ll
ring, sir, if you want anything? A cup of coffee, now——?”
“Nothing!” Storm waved aside the suggestion with a shudder of
disgust. “I only wish to be alone.”
When the maids had withdrawn and their sobs were cut off by the
closing of the pantry door, Storm’s hands dropped to his knees. They
had accepted his suggestion of the cause of death without question,
but would it be safe for him to volunteer that theory as a foregone
conclusion to the keener mind of the doctor? He knew the strength of
first impressions; were the circumstantial proofs of accidental death
obvious enough to preclude all suspicion of foul play? The evidence
which had seemed so impregnable to him when he first conceived it
crumbled before the wave of torturing doubt that assailed him. He
did not find it as easy as he had planned to put behind him forever
his secret knowledge of the truth. What would his thought processes
have been had he indeed believed his wife to be sleeping safe in her
room and come down to find her lying dead here?
The whirr of a light-running motor outside galvanized Storm into
action, and he sprang up from his chair and hurried down the hall,
flinging the front door wide just as the doctor mounted the veranda
steps. A fine, grizzled stubble adorned the latter’s usually clean-
shaven jaw, and his light ulster was buttoned close up about his neck
as though to conceal deficiencies in his hastily donned attire.
“What is it, old man?” he began genially, and then at sight of the
other’s face he paused abruptly.
“Come.”
Without another word Storm turned and led the way to the den,
and the physician followed in silence. At the door the former, with a
gesture, stepped aside, and Dr. Carr’s glance fell upon the body.
Stifling an exclamation he advanced and made a brief, deft
examination. Then, shaken from his professional calm, he rose.
“There—is nothing I can do,” he announced jerkily. “She has
been dead for several hours—seven or eight, at least. Good God,
Storm, what does this mean?”
The gaze of the physician was filled with blank amazement and
horror, but to the other man it seemed sternly accusing, and he
stammered brokenly:
“I don’t know! She must have been here all night like this, while I
thought her safe in bed and asleep! It is horrible! Horrible!”
He hid his face in his hands to shut out those keen eyes bent
upon him, and Dr. Carr advanced and forced him gently down into a
chair.
“Here, man, don’t give way now! Pull yourself together! Do you
mean that you only just discovered——?”
“A minute before I telephoned to you. It was the housemaid who
found Leila like this when she came down to dust around, and her
screams awakened me.” Storm paused. A detailed explanation
would look too much like an attempt at an alibi; he must wait for the
other to drag the facts from him. “Oh, why didn’t I speak, why didn’t I
look in her room when I came home last night! But I was afraid of
disturbing her——”
He paused, and Dr. Carr asked quickly:
“You returned late and thought she had retired?”
“Yes. It was after eleven—I took the ten o’clock train from town—
and when I got here the house was all dark and silent, and Leila’s
bedroom and dressing-room doors were closed.” Storm’s hands
dropped to the arms of his chair, and he stared straight ahead of him
as he added deliberately: “I went to bed as quietly as I could so as
not to waken her, for she hadn’t been well; she was threatened with
one of these fainting attacks the night before last. I should never
have left her! But you know how it has been, Doctor; you never could
tell when they were coming on, and she had never done any real
harm to herself before——”
“ ‘Fainting attacks?’ ” the doctor repeated sharply. He wheeled and
approached the body once more and Storm watched him with bated
breath. “The right temple bone has been crushed in, as if with some
heavy, blunt instrument!”
“That knob on the corner of the fender——” Storm felt his way
carefully. “It—it’s all covered with blood! She must have fallen——”
The doctor glanced at it and then turned swiftly to him.
“Look here, Storm, have you questioned the servants? What do
they know of this?”
“Nothing. I’ve been too nearly crazed to question them
coherently, but from what I gathered they went to bed early and left
her sitting out on the veranda, and the housemaid said something
about Leila having told her that she would wait up for me, Think of it,
Doctor! She must have come in here——”
“Hold on a minute. Was the body lying just like this, face
upturned, when you saw it first?”
Storm nodded.
“Yes. I rushed to her and started to lift her up, but when I saw that
—that she was dead——”
He bowed his head on his breast as if unable to continue, but he
saw the physician measure with a swift eye the distance from the
chair to the body, and then stoop to examine the fender again.
Storm’s knuckles whitened as he gripped the chair-arms in an agony
of suspense. Would his implied suggestion bear fruit? Had he too
palpably ignored the other’s intimation that a blow had been struck?
Would it have been more natural for him to have presupposed
violence, murder, as the physician obviously had done? It was too
late now for him to question the wisdom of his course; he could
brace himself for the next step in the ghastly farce.
“Has anyone touched the body?” Dr. Carr spoke with professional
brusqueness.
“Yes; when I came back here after telephoning to you both the
servants were in the room, and Ellen was bending over my poor wife
—I can’t speak of it, Doctor; I can’t realize it! I feel as if I should go
mad! Leila——”
“I know, old man, but we’ve got to get at the bottom of this thing.
Try to collect yourself and think back. You said you were awakened
by the housemaid’s screams when she discovered the body. Do you
know if she touched it before you got down here?”
Storm shook his head.
“I never asked.” He kept his eyes lowered carefully to hide a glint
of triumph. When Carr discovered that Agnes had found the body
lying face down, the case he had manufactured would be complete.
“I wish you—you’d talk to them, Doctor. I—I can’t, just now. I’m all
in!”
“I will. Don’t think about them.” Dr. Carr glanced at the low light
on the desk which still glowed brazenly in the gloom of the curtained
room. “Who turned on that light instead of drawing aside the
curtains?”
“It must have been on all night. Agnes said that was the first thing
she noticed when she got to the door here; that the light was still
going. Then she saw the body——” he halted again and added in
studied ingenuousness: “I might have observed it when I came home
last night, I suppose, but it is scarcely perceptible from the front hall,
and finding it all dark there except for the lamp on the newel post
which Leila always leaves lighted for me, I went straight upstairs. It
never occurred to me that she would be waiting up for me, and in
here, although she has done so occasionally. I was pretty tired. My
God, Doctor, if I had seen the light and come in here, I might have
been able to save her! There might have been something I could do
—!”
“No, Storm, no one could have done anything for her. Death was
instantaneous. You heard nothing after you went upstairs? No sound
of a fall, or disturbance of any kind?”
“Nothing.” Storm started from his chair. “It couldn’t have
happened after I retired! Surely, if Leila had been alive when I
entered the house she would have heard me! The servants sleep
like logs, but I waken at the slightest sound. I would have known
——!”
“That’s so. Of course, you would, old man.” Dr. Carr’s tone was
soothingly compassionate. “You’d better go upstairs now and put on
some clothes; you haven’t even slippers on your feet. I’ll have a word
with the servants while you’re gone——”
“But Leila!” Storm forced his shrinking eyes to turn yearningly
toward the still form. “I can’t bear to leave her lying like that! Ellen
wanted to lift her to the couch, but I thought we’d better wait until you
came——”
“Why?” The doctor shot the question at him, and Storm, realizing
his slip, swiftly countered:
“I didn’t know what to think! I tell you, Doctor, when I first came in
and saw her it looked almost like murder! My brain isn’t clear yet
from the shock of it, although when I saw the blood on the fender, of
course, I knew she must have fallen, and then I remembered her
condition—those fainting spells, and all that. There isn’t a soul in the
world who would harm a hair of Leila’s head!” He threw up his hands
with an impotent gesture. “I felt dazed, helpless! I had to depend on
you, and I wanted you to see everything just as it was.”
“You can rely on me, old man!” The doctor patted his arm and led
him to the door. “We must not move her yet, however. Under the
circumstances we’ll have to notify the authorities, merely as a matter
of form, and they may want to investigate for themselves. I’ll call
them up and then come and give you something to steady your
nerves. You’re bearing up splendidly, but we can’t have you going to
pieces until the formalities have been concluded. Is there anyone
you would like me to send for; any member of the family, or friend?”
“Yes!” Storm exclaimed in a sudden flash of inspiration. “Get old
George for me, will you, Doctor? George Holworthy, you know; 0328
Stuyvesant. Tell him to come out here on the first train, that I need
him. Don’t—don’t go into details, but make him understand that it’s
serious, desperate! I’m not a weakling, I won’t break down, but I’d
feel stronger if George were here. We’ve been friends for years.”
“I know; I’ll get him.” Dr. Carr drew out his handkerchief and
mopped his forehead. “Get into some clothes now. I’ll be right with
you.”
“I would rather stay here with Leila, alone with her——” Storm
murmured mendaciously. “I won’t touch her, Doctor; let me stay!”
“No.” The physician transferred the key to the outside of the door
and locked it decisively as he spoke. “It wouldn’t do you any good,
Storm. You’ve got to brace up. You have put this affair in my hands
now, and I order you to pull yourself together. Get upstairs and take
a cold shower and then I’ll give you a sedative.”
With a last glance at the closed door, Storm stumbled to the
stairs and mounted, lurching against the banisters as though
overcome by weakness; but in reality his brain was seething with the
thought of the danger yet ahead.
He closed the door of his room softly behind him, and then
paused. What if Carr’s sympathetic, friendly manner had been
assumed to cloak a suspicion of the truth? The physician had
seemed to accept his theory, but he had not committed himself.
Suppose he were following, tiptoeing up the stairs now to peer in at
the keyhole——!
The thought was madness, yet Storm turned instinctively. The
key of his door had been mislaid long ago and never replaced, but a
heavy lounging robe hung from a peg on the center panel. Catching
a fold of it he drew it back over the door-knob so that it trailed before
the lock like a curtain, thick and impenetrable. His bathroom had no
entrance leading to the hall, and the only other door—that opening
on Leila’s dressing-room was protected by a cretonne portière.
He realized that he had no need for secrecy, there was nothing to
be done now which all the world might not safely see—and yet an
insane desire came to him to conceal himself from all eyes. He must
have a moment of respite from the rôle he was playing, a moment of
peace and calmness to gird himself anew for what the immediate
future might hold.
Did Carr accept the situation at its face value? The man whom in
the night he had half-scornfully dismissed from his mind as a simple
country practitioner now appeared in a vastly different light. For the
moment he held in his hands Storm’s immunity from suspicion, and
the latter’s disquietude increased.
There was his step upon the stair! What would his face reveal?
With a quick revulsion of feeling, Storm sprang to the door and
opened it.
The smile with which the benign physician greeted him removed
all lingering doubt.
“Not taken your shower? Come, Storm, this won’t do! I’ve
’phoned, and the coroner’s assistant is on his way over from the
county seat.” He held out a small glass, and the other took it
mechanically. “Drink this and pull yourself together, for there are
some trying hours ahead.”
Chapter VI.
The Verdict
“You were right, unquestionably, Storm,” Dr. Carr announced
twenty minutes later as the other joined him in the library. “I don’t
mind admitting that my thoughts—my sensations, rather—when first
I saw the body were identical with what yours had been, but there’s
only one possible conclusion. Mrs. Storm must have been seated in
that big chair by the hearth when she felt suddenly faint; and in trying
to rise, she must have fallen forward, striking her forehead with
crushing force against that solid brass knob on the fender. Agnes
tells me that she found her mistress lying face downward against it,
and thinking she had merely fainted, turned the body over. It was
only when she saw the wound that she screamed. Of one thing you
may be sure; Mrs. Storm didn’t suffer. She never knew what struck
her. Death came instantly.”
Storm sank into a chair, his twitching face turned from the light. If
Carr only knew!
“I must try to think that!” he murmured. “Did you get George
Holworthy on the ’phone, Doctor?”
“Yes. He is on his way out here by now. Agnes gave me some
coffee, and I told her to bring a tray for you—No protests!” as Storm
made a gesture of repugnance. “You are under my orders,
remember, and you’ve got to keep going.”
Storm drank the coffee obediently enough when it came,
conscious of a craving for its stimulus. The first and most hazardous
milestone was passed; Dr. Carr had fallen for his game, had been
completely hoodwinked by the circumstantial evidence he had
arranged. He had won an unconscious yet powerful ally, and the way
seemed clear before him, but the glow of elation was past.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookname.com

You might also like