100% found this document useful (1 vote)
3 views

Python for Bioinformatics 2nd Edition Sebastian Bassi - Download the ebook today and own the complete content

The document promotes the second edition of 'Python for Bioinformatics' by Sebastian Bassi, available for download at ebookfinal.com. It includes links to additional recommended ebooks and textbooks related to Python and bioinformatics. The book aims to integrate mathematical, statistical, and computational methods into biology, appealing to students and professionals in the field.

Uploaded by

zokrametja
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
3 views

Python for Bioinformatics 2nd Edition Sebastian Bassi - Download the ebook today and own the complete content

The document promotes the second edition of 'Python for Bioinformatics' by Sebastian Bassi, available for download at ebookfinal.com. It includes links to additional recommended ebooks and textbooks related to Python and bioinformatics. The book aims to integrate mathematical, statistical, and computational methods into biology, appealing to students and professionals in the field.

Uploaded by

zokrametja
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 57

Visit ebookfinal.

com to download the full version and


explore more ebooks or textbooks

Python for Bioinformatics 2nd Edition Sebastian


Bassi

_____ Click the link below to download _____


https://ebookfinal.com/download/python-for-
bioinformatics-2nd-edition-sebastian-bassi/

Explore and download more ebooks or textbook at ebookfinal.com


Here are some recommended products that we believe you will be
interested in. You can click the link to download.

Python for Bioinformatics Chapman Hall CRC Mathematical


Computational Biology Sebastian Bassi

https://ebookfinal.com/download/python-for-bioinformatics-chapman-
hall-crc-mathematical-computational-biology-sebastian-bassi/

Python Machine Learning Second Edition Sebastian Raschka

https://ebookfinal.com/download/python-machine-learning-second-
edition-sebastian-raschka/

Bioinformatics Programming Using Python 1st Edition


Mitchell L. Model

https://ebookfinal.com/download/bioinformatics-programming-using-
python-1st-edition-mitchell-l-model/

Black Hat Python Python Programming For Hackers And


Pentesters 2nd Edition Justin Seitz And Tim Arnold

https://ebookfinal.com/download/black-hat-python-python-programming-
for-hackers-and-pentesters-2nd-edition-justin-seitz-and-tim-arnold/
Clinical Bioinformatics 2nd Edition Ronald Trent (Eds.)

https://ebookfinal.com/download/clinical-bioinformatics-2nd-edition-
ronald-trent-eds/

Raspberry Pi for Python Programmers Cookbook 2nd, revised


Edition Tim Cox

https://ebookfinal.com/download/raspberry-pi-for-python-programmers-
cookbook-2nd-revised-edition-tim-cox/

Instant Notes in Bioinformatics 2nd Edition Charlie


Hodgman

https://ebookfinal.com/download/instant-notes-in-bioinformatics-2nd-
edition-charlie-hodgman/

Python in easy steps Covers Python 3 7 2nd Edition Mike


Mcgrath

https://ebookfinal.com/download/python-in-easy-steps-covers-
python-3-7-2nd-edition-mike-mcgrath/

Data Mining for Bioinformatics 1st Edition Sumeet Dua

https://ebookfinal.com/download/data-mining-for-bioinformatics-1st-
edition-sumeet-dua/
Python for Bioinformatics 2nd Edition Sebastian Bassi
Digital Instant Download
Author(s): Sebastian Bassi
ISBN(s): 9781138035263, 1138035262
Edition: 2nd
File Details: PDF, 4.97 MB
Year: 2017
Language: english
PYTHON FOR
BIOINFORMATICS
SECOND EDITION
CHAPMAN & HALL/CRC
Mathematical and Computational Biology Series

Aims and scope:


This series aims to capture new developments and summarize what is known
over the entire spectrum of mathematical and computational biology and
medicine. It seeks to encourage the integration of mathematical, statistical,
and computational methods into biology by publishing a broad range of
textbooks, reference works, and handbooks. The titles included in the
series are meant to appeal to students, researchers, and professionals in the
mathematical, statistical and computational sciences, fundamental biology
and bioengineering, as well as interdisciplinary researchers involved in the
field. The inclusion of concrete examples and applications, and programming
techniques and examples, is highly encouraged.

Series Editors

N. F. Britton
Department of Mathematical Sciences
University of Bath

Xihong Lin
Department of Biostatistics
Harvard University

Nicola Mulder
University of Cape Town
South Africa

Maria Victoria Schneider


European Bioinformatics Institute

Mona Singh
Department of Computer Science
Princeton University

Anna Tramontano
Department of Physics
University of Rome La Sapienza

Proposals for the series should be submitted to one of the series editors above or directly to:
CRC Press, Taylor & Francis Group
3 Park Square, Milton Park
Abingdon, Oxfordshire OX14 4RN
UK
Published Titles
An Introduction to Systems Biology: Statistical Methods for QTL Mapping
Design Principles of Biological Circuits Zehua Chen
Uri Alon An Introduction to Physical Oncology:
Glycome Informatics: Methods and How Mechanistic Mathematical
Applications Modeling Can Improve Cancer Therapy
Kiyoko F. Aoki-Kinoshita Outcomes
Computational Systems Biology of Vittorio Cristini, Eugene J. Koay,
Cancer and Zhihui Wang
Emmanuel Barillot, Laurence Calzone, Normal Mode Analysis: Theory and
Philippe Hupé, Jean-Philippe Vert, and Applications to Biological and Chemical
Andrei Zinovyev Systems
Python for Bioinformatics, Second Edition Qiang Cui and Ivet Bahar
Sebastian Bassi Kinetic Modelling in Systems Biology
Quantitative Biology: From Molecular to Oleg Demin and Igor Goryanin
Cellular Systems Data Analysis Tools for DNA Microarrays
Sebastian Bassi Sorin Draghici
Methods in Medical Informatics: Statistics and Data Analysis for
Fundamentals of Healthcare Microarrays Using R and Bioconductor,
Programming in Perl, Python, and Ruby Second Edition
Jules J. Berman Sorin Drăghici
Chromatin: Structure, Dynamics, Computational Neuroscience:
Regulation A Comprehensive Approach
Ralf Blossey Jianfeng Feng
Computational Biology: A Statistical Biological Sequence Analysis Using
Mechanics Perspective the SeqAn C++ Library
Ralf Blossey Andreas Gogol-Döring and Knut Reinert
Game-Theoretical Models in Biology Gene Expression Studies Using
Mark Broom and Jan Rychtář Affymetrix Microarrays
Computational and Visualization Hinrich Göhlmann and Willem Talloen
Techniques for Structural Bioinformatics Handbook of Hidden Markov Models
Using Chimera in Bioinformatics
Forbes J. Burkowski Martin Gollery
Structural Bioinformatics: An Algorithmic Meta-analysis and Combining
Approach Information in Genetics and Genomics
Forbes J. Burkowski Rudy Guerra and Darlene R. Goldstein
Spatial Ecology Differential Equations and Mathematical
Stephen Cantrell, Chris Cosner, and Biology, Second Edition
Shigui Ruan D.S. Jones, M.J. Plank, and B.D. Sleeman
Cell Mechanics: From Single Scale- Knowledge Discovery in Proteomics
Based Models to Multiscale Modeling Igor Jurisica and Dennis Wigle
Arnaud Chauvière, Luigi Preziosi, Introduction to Proteins: Structure,
and Claude Verdier Function, and Motion
Bayesian Phylogenetics: Methods, Amit Kessel and Nir Ben-Tal
Algorithms, and Applications
Ming-Hui Chen, Lynn Kuo, and Paul O. Lewis
Published Titles (continued)
RNA-seq Data Analysis: A Practical Introduction to Bio-Ontologies
Approach Peter N. Robinson and Sebastian Bauer
Eija Korpelainen, Jarno Tuimala, Dynamics of Biological Systems
Panu Somervuo, Mikael Huss, and Garry Wong Michael Small
Introduction to Mathematical Oncology Genome Annotation
Yang Kuang, John D. Nagy, and Jung Soh, Paul M.K. Gordon, and
Steffen E. Eikenberry Christoph W. Sensen
Biological Computation Niche Modeling: Predictions from
Ehud Lamm and Ron Unger Statistical Distributions
Optimal Control Applied to Biological David Stockwell
Models Algorithms for Next-Generation
Suzanne Lenhart and John T. Workman Sequencing
Clustering in Bioinformatics and Drug Wing-Kin Sung
Discovery Algorithms in Bioinformatics: A Practical
John D. MacCuish and Norah E. MacCuish Introduction
Spatiotemporal Patterns in Ecology Wing-Kin Sung
and Epidemiology: Theory, Models, Introduction to Bioinformatics
and Simulation Anna Tramontano
Horst Malchow, Sergei V. Petrovskii, and
The Ten Most Wanted Solutions in
Ezio Venturino
Protein Bioinformatics
Stochastic Dynamics for Systems Anna Tramontano
Biology
Combinatorial Pattern Matching
Christian Mazza and Michel Benaïm
Algorithms in Computational Biology
Statistical Modeling and Machine Using Perl and R
Learning for Molecular Biology Gabriel Valiente
Alan M. Moses
Managing Your Biological Data with
Engineering Genetic Circuits Python
Chris J. Myers Allegra Via, Kristian Rother, and
Pattern Discovery in Bioinformatics: Anna Tramontano
Theory & Algorithms Cancer Systems Biology
Laxmi Parida Edwin Wang
Exactly Solvable Models of Biological Stochastic Modelling for Systems
Invasion Biology, Second Edition
Sergei V. Petrovskii and Bai-Lian Li Darren J. Wilkinson
Computational Hydrodynamics of Big Data Analysis for Bioinformatics and
Capsules and Biological Cells Biomedical Discoveries
C. Pozrikidis Shui Qing Ye
Modeling and Simulation of Capsules Bioinformatics: A Practical Approach
and Biological Cells Shui Qing Ye
C. Pozrikidis
Introduction to Computational
Cancer Modelling and Simulation Proteomics
Luigi Preziosi Golan Yona
PYTHON FOR
BIOINFORMATICS
SECOND EDITION

SEBASTIAN BASSI
MATLAB• is a trademark of The MathWorks, Inc. and is used with permission. The MathWorks does not warrant the
accuracy of the text or exercises in this book. This book’s use or discussion of MATLAB • software or related products
does not constitute endorsement or sponsorship by The MathWorks of a particular pedagogical approach or particular
use of the MATLAB• software.

CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742

© 2018 by Taylor & Francis Group, LLC


CRC Press is an imprint of Taylor & Francis Group, an Informa business

No claim to original U.S. Government works

Printed on acid-free paper


Version Date: 20170626

International Standard Book Number-13: 978-1-1380-3526-3 (Hardback)

This book contains information obtained from authentic and highly regarded sources. Reasonable efforts have been
made to publish reliable data and information, but the author and publisher cannot assume responsibility for the validity
of all materials or the consequences of their use. The authors and publishers have attempted to trace the copyright
holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this
form has not been obtained. If any copyright material has not been acknowledged please write and let us know so we may
rectify in any future reprint.

Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or utilized
in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying,
microfilming, and recording, or in any information storage or retrieval system, without written permission from the
publishers.

For permission to photocopy or use material electronically from this work, please access www.copyright.com (http://
www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923,
978-750-8400. CCC is a not-for-profit organization that provides licenses and registration for a variety of users. For
organizations that have been granted a photocopy license by the CCC, a separate system of payment has been arranged.

Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for
identification and explanation without intent to infringe.

Library of Congress Cataloging-in-Publication Data

Names: Bassi, Sebastian, author.


Title: Python for bioinformatics / Sebastian Bassi.
Description: Second edition. | Boca Raton : CRC Press, 2017. | Series:
Chapman & Hall/CRC mathematical and computational biology | Includes
bibliographical references and index.
Identifiers: LCCN 2017014460| ISBN 9781138035263 (pbk. : alk. paper) |
ISBN 9781138094376 (hardback : alk. paper) | ISBN 9781315268743 (ebook) |
ISBN 9781351976961 (ebook) | ISBN 9781351976954 (ebook) |
ISBN 9781351976947 (ebook)
Subjects: LCSH: Bioinformatics. | Python (Computer program language)
Classification: LCC QH324.2 .B387 2017 | DDC 570.285--dc23
LC record available at https://lccn.loc.gov/2017014460

Visit the Taylor & Francis Web site at


http://www.taylorandfrancis.com
and the CRC Press Web site at
http://www.crcpress.com
Contents

List of Figures xvii

List of Tables xxi

Preface to the First Edition xxiii

Preface to the Second Edition xxv

Acknowledgments xxix

Section I Programming

Chapter 1  Introduction 3
1.1 WHO SHOULD READ THIS BOOK 3
1.1.1 What the Reader Should Already Know 4
1.2 USING THIS BOOK 4
1.2.1 Typographical Conventions 4
1.2.2 Python Versions 5
1.2.3 Code Style 5
1.2.4 Get the Most from This Book without Reading It All 6
1.2.5 Online Resources Related to This Book 7
1.3 WHY LEARN TO PROGRAM? 7
1.4 BASIC PROGRAMMING CONCEPTS 8
1.4.1 What Is a Program? 8
1.5 WHY PYTHON? 10
1.5.1 Main Features of Python 10
1.5.2 Comparing Python with Other Languages 11
1.5.3 How Is It Used? 14
1.5.4 Who Uses Python? 15
1.5.5 Flavors of Python 15
1.5.6 Special Python Distributions 16
1.6 ADDITIONAL RESOURCES 17

vii
viii  Contents

Chapter 2  First Steps with Python 19


2.1 INSTALLING PYTHON 20
2.1.1 Learn Python by Using It 20
2.1.2 Install Python Locally 20
2.1.3 Using Python Online 21
2.1.4 Testing Python 22
2.1.5 First Use 22
2.2 INTERACTIVE MODE 23
2.2.1 Baby Steps 23
2.2.2 Basic Input and Output 23
2.2.3 More on the Interactive Mode 24
2.2.4 Mathematical Operations 26
2.2.5 Exit from the Python Shell 27
2.3 BATCH MODE 27
2.3.1 Comments 29
2.3.2 Indentation 30
2.4 CHOOSING AN EDITOR 32
2.4.1 Sublime Text 32
2.4.2 Atom 33
2.4.3 PyCharm 34
2.4.4 Spyder IDE 35
2.4.5 Final Words about Editors 36
2.5 OTHER TOOLS 36
2.6 ADDITIONAL RESOURCES 37
2.7 SELF-EVALUATION 37

Chapter 3  Basic Programming: Data Types 39


3.1 STRINGS 40
3.1.1 Strings Are Sequences of Unicode Characters 41
3.1.2 String Manipulation 42
3.1.3 Methods Associated with Strings 42
3.2 LISTS 44
3.2.1 Accessing List Elements 45
3.2.2 List with Multiple Repeated Items 45
3.2.3 List Comprehension 46
3.2.4 Modifying Lists 47
Contents  ix

3.2.5 Copying a List 49


3.3 TUPLES 49
3.3.1 Tuples Are Immutable Lists 49
3.4 COMMON PROPERTIES OF THE SEQUENCES 51
3.5 DICTIONARIES 54
3.5.1 Mapping: Calling Each Value by a Name 54
3.5.2 Operating with Dictionaries 56
3.6 SETS 59
3.6.1 Unordered Collection of Objects 59
3.6.2 Set Operations 60
3.6.3 Shared Operations with Other Data Types 62
3.6.4 Immutable Set: Frozenset 63
3.7 NAMING OBJECTS 63
3.8 ASSIGNING A VALUE TO A VARIABLE VERSUS BINDING A NAME
TO AN OBJECT 64
3.9 ADDITIONAL RESOURCES 67
3.10 SELF-EVALUATION 68

Chapter 4  Programming: Flow Control 69


4.1 IF-ELSE 69
4.1.1 Pass Statement 74
4.2 FOR LOOP 75
4.3 WHILE LOOP 77
4.4 BREAK: BREAKING THE LOOP 78
4.5 WRAPPING IT UP 80
4.5.1 Estimate the Net Charge of a Protein 80
4.5.2 Search for a Low-Degeneration Zone 81
4.6 ADDITIONAL RESOURCES 83
4.7 SELF-EVALUATION 83

Chapter 5  Handling Files 85


5.1 READING FILES 86
5.1.1 Example of File Handling 87
5.2 WRITING FILES 89
5.2.1 File Reading and Writing Examples 90
5.3 CSV FILES 90
x  Contents

5.4 PICKLE: STORING AND RETRIEVING THE CONTENTS OF VARI-


ABLES 94
5.5 JSON FILES 96
5.6 FILE HANDLING: OS, OS.PATH, SHUTIL, AND PATH.PY MODULE 98
5.6.1 path.py Module 100
5.6.2 Consolidate Multiple DNA Sequences into One FASTA File 102
5.7 ADDITIONAL RESOURCES 102
5.8 SELF-EVALUATION 103

Chapter 6  Code Modularizing 105


6.1 INTRODUCTION TO CODE MODULARIZING 105
6.2 FUNCTIONS 106
6.2.1 Standard Way to Make Python Code Modular 106
6.2.2 Function Parameter Options 110
6.2.3 Generators 113
6.3 MODULES AND PACKAGES 114
6.3.1 Using Modules 115
6.3.2 Packages 116
6.3.3 Installing Third-Party Modules 117
6.3.4 Virtualenv: Isolated Python Environments 119
6.3.5 Conda: Anaconda Virtual Environment 121
6.3.6 Creating Modules 124
6.3.7 Testing Modules 125
6.4 ADDITIONAL RESOURCES 127
6.5 SELF-EVALUATION 128

Chapter 7  Error Handling 129


7.1 INTRODUCTION TO ERROR HANDLING 129
7.1.1 Try and Except 131
7.1.2 Exception Types 134
7.1.3 Triggering Exceptions 135
7.2 CREATING CUSTOMIZED EXCEPTIONS 136
7.3 ADDITIONAL RESOURCES 137
7.4 SELF-EVALUATION 138

Chapter 8  Introduction to Object Orienting Programming (OOP) 139


8.1 OBJECT PARADIGM AND PYTHON 139
Contents  xi

8.2 EXPLORING THE JARGON 140


8.3 CREATING CLASSES 142
8.4 INHERITANCE 145
8.5 SPECIAL METHODS 149
8.5.1 Create a New Data Type Using a Built-in Data Type 154
8.6 MAKING OUR CODE PRIVATE 154
8.7 ADDITIONAL RESOURCES 155
8.8 SELF-EVALUATION 156

Chapter 9  Introduction to Biopython 157


9.1 WHAT IS BIOPYTHON? 158
9.1.1 Project Organization 158
9.2 INSTALLING BIOPYTHON 159
9.3 BIOPYTHON COMPONENTS 162
9.3.1 Alphabet 162
9.3.2 Seq 163
9.3.3 MutableSeq 165
9.3.4 SeqRecord 166
9.3.5 Align 167
9.3.6 AlignIO 169
9.3.7 ClustalW 171
9.3.8 SeqIO 173
9.3.9 AlignIO 176
9.3.10 BLAST 177
9.3.11 Biological Related Data 187
9.3.12 Entrez 190
9.3.13 PDB 194
9.3.14 PROSITE 196
9.3.15 Restriction 197
9.3.16 SeqUtils 200
9.3.17 Sequencing 202
9.3.18 SwissProt 205
9.4 CONCLUSION 207
9.5 ADDITIONAL RESOURCES 207
9.6 SELF-EVALUATION 209
xii  Contents

Section II Advanced Topics

Chapter 10  Web Applications 213


10.1 INTRODUCTION TO PYTHON ON THE WEB 213
10.2 CGI IN PYTHON 214
10.2.1 Configuring a Web Server for CGI 215
10.2.2 Testing the Server with Our Script 215
10.2.3 Web Program to Calculate the Net Charge of a Protein
(CGI version) 219
10.3 WSGI 221
10.3.1 Bottle: A Python Web Framework for WSGI 222
10.3.2 Installing Bottle 223
10.3.3 Minimal Bottle Application 223
10.3.4 Bottle Components 224
10.3.5 Web Program to Calculate the Net Charge of a Protein
(Bottle Version) 229
10.3.6 Installing a WSGI Program in Apache 232
10.4 ALTERNATIVE OPTIONS FOR MAKING PYTHON-BASED DYNAMIC
WEB SITES 232
10.5 SOME WORDS ABOUT SCRIPT SECURITY 232
10.6 WHERE TO HOST PYTHON PROGRAMS 234
10.7 ADDITIONAL RESOURCES 235
10.8 SELF-EVALUATION 236

Chapter 11  XML 237


11.1 INTRODUCTION TO XML 237
11.2 STRUCTURE OF AN XML DOCUMENT 241
11.3 METHODS TO ACCESS DATA INSIDE AN XML DOCUMENT 246
11.3.1 SAX: cElementTree Iterparse 246
11.4 SUMMARY 251
11.5 ADDITIONAL RESOURCES 252
11.6 SELF-EVALUATION 252

Chapter 12  Python and Databases 255


12.1 INTRODUCTION TO DATABASES 256
12.1.1 Database Management: RDBMS 257
12.1.2 Components of a Relational Database 258
Contents  xiii

12.1.3 Database Data Types 260


12.2 CONNECTING TO A DATABASE 261
12.3 CREATING A MYSQL DATABASE 262
12.3.1 Creating Tables 263
12.3.2 Loading a Table 264
12.4 PLANNING AHEAD 266
12.4.1 PythonU: Sample Database 266
12.5 SELECT: QUERYING A DATABASE 269
12.5.1 Building a Query 271
12.5.2 Updating a Database 273
12.5.3 Deleting a Record from a Database 273
12.6 ACCESSING A DATABASE FROM PYTHON 274
12.6.1 PyMySQL Module 274
12.6.2 Establishing the Connection 274
12.6.3 Executing the Query from Python 275
12.7 SQLITE 276
12.8 NOSQL DATABASES: MONGODB 278
12.8.1 Using MongoDB with PyMongo 278
12.9 ADDITIONAL RESOURCES 282
12.10 SELF-EVALUATION 284

Chapter 13  Regular Expressions 285


13.1 INTRODUCTION TO REGULAR EXPRESSIONS (REGEX) 285
13.1.1 REGEX Syntax 286
13.2 THE RE MODULE 287
13.2.1 Compiling a Pattern 290
13.2.2 REGEX Examples 292
13.2.3 Pattern Replace 294
13.3 REGEX IN BIOINFORMATICS 294
13.3.1 Cleaning Up a Sequence 296
13.4 ADDITIONAL RESOURCES 297
13.5 SELF-EVALUATION 298

Chapter 14  Graphics in Python 299


14.1 INTRODUCTION TO BOKEH 299
14.2 INSTALLING BOKEH 299
14.3 USING BOKEH 301
xiv  Contents

14.3.1 A Simple X-Y Plot 303


14.3.2 Two Data Series Plot 304
14.3.3 A Scatter Plot 306
14.3.4 A Heatmap 308
14.3.5 A Chord Diagram 309

Section III Python Recipes with Commented Source Code

Chapter 15  Sequence Manipulation in Batch 315


15.1 PROBLEM DESCRIPTION 315
15.2 PROBLEM ONE: CREATE A FASTA FILE WITH RANDOM SE-
QUENCES 315
15.2.1 Commented Source Code 315
15.3 PROBLEM TWO: FILTER NOT EMPTY SEQUENCES FROM A
FASTA FILE 316
15.3.1 Commented Source Code 317
15.4 PROBLEM THREE: MODIFY EVERY RECORD OF A FASTA FILE 319
15.4.1 Commented Source Code 320

Chapter 16  Web Application for Filtering Vector Contamination 321


16.1 PROBLEM DESCRIPTION 321
16.1.1 Commented Source Code 322
16.2 ADDITIONAL RESOURCES 326

Chapter 17  Searching for PCR Primers Using Primer3 329


17.1 PROBLEM DESCRIPTION 329
17.2 PRIMER DESIGN FLANKING A VARIABLE LENGTH REGION 330
17.2.1 Commented Source Code 331
17.3 PRIMER DESIGN FLANKING A VARIABLE LENGTH REGION,
WITH BIOPYTHON 332
17.4 ADDITIONAL RESOURCES 333

Chapter 18  Calculating Melting Temperature from a Set of Primers 335


18.1 PROBLEM DESCRIPTION 335
18.1.1 Commented Source Code 336
18.2 ADDITIONAL RESOURCES 336

Chapter 19  Filtering Out Specific Fields from a GenBank File 339


19.1 EXTRACTING SELECTED PROTEIN SEQUENCES 339
Contents  xv

19.1.1 Commented Source Code 339


19.2 EXTRACTING THE UPSTREAM REGION OF SELECTED PRO-
TEINS 340
19.2.1 Commented Source Code 340
19.3 ADDITIONAL RESOURCES 341

Chapter 20  Inferring Splicing Sites 343


20.1 PROBLEM DESCRIPTION 343
20.1.1 Infer Splicing Sites with Commented Source Code 345
20.1.2 Sample Run of Estimate Intron Program 347

Chapter 21  Web Server for Multiple Alignment 349


21.1 PROBLEM DESCRIPTION 349
21.1.1 Web Interface: Front-End. HTML Code 349
21.1.2 Web Interface: Server-Side Script. Commented Source Code 351
21.2 ADDITIONAL RESOURCES 353

Chapter 22  Drawing Marker Positions Using Data Stored in a Database 355


22.1 PROBLEM DESCRIPTION 355
22.1.1 Preliminary Work on the Data 355
22.1.2 MongoDB Version with Commented Source Code 358

Section IV Appendices

Appendix A  Collaborative Development: Version Control with GitHub 365


A.1 INTRODUCTION TO VERSION CONTROL 366
A.2 VERSION YOUR CODE 367
A.3 SHARE YOUR CODE 375
A.4 CONTRIBUTE TO OTHER PROJECTS 381
A.5 CONCLUSION 382
A.6 METHODS 384
A.7 ADDITIONAL RESOURCES 384

Appendix B  Install a Bottle App in PythonAnywhere 385


B.1 PYTHONANYWHERE 385
B.1.1 What Is PythonAnywhere 385
B.1.2 Installing a Web App in PythonAnywhere 385
xvi  Contents

Appendix C  Scientific Python Cheat Sheet 393


C.1 PURE PYTHON 394
C.2 VIRTUALENV 400
C.3 CONDA 402
C.4 IPYTHON 403
C.5 NUMPY 405
C.6 MATPLOTLIB 410
C.7 SCIPY 412
C.8 PANDAS 413

Index 417
List of Figures

2.1 Anaconda install in macOS. 21


2.2 Anaconda Python interactive terminal. 23
2.3 PyCharm Edu welcome screen. 35

3.1 Intersection. 60
3.2 Union. 61
3.3 Difference. 61
3.4 Symmetric difference. 62
3.5 Case 1. 65
3.6 Case 2. 66

5.1 Excel formatted spreadsheet called sampledata.xlsx. 93

8.1 IUPAC nucleic acid notation table. 147

9.1 Anatomy of a BLAST result. 181

10.1 Our first CGI. 216


10.2 CGI accessed from local disk instead from a web server. 217
10.3 greeting.html: A very simple form. 217
10.4 Output of CGI program that processes greeting.html. 218
10.5 Form protcharge.html ready to be submitted. 220
10.6 Net charge CGI result. 222
10.7 Hello World program made in Bottle, as seen in a browser. 224
10.8 Form for the web app to calculate the net charge of a protein. 229

11.1 Screenshot of XML viewer. 244


11.2 Codebeautify, a web based XML viewer. 245

12.1 Screenshot of PhpMyAdmin. 258


12.2 Creating a new database using phpMyAdmin. 262
12.3 Creating a new table using phpMyAdmin. 264

xvii
xviii  LIST OF FIGURES

12.4 View of the Student table. 266


12.5 An intentionally faulty “Grades” table. 267
12.6 A better “Grades” table. 267
12.7 Courses table: A lookup table. 268
12.8 Modified “Grades” table. 268
12.9 Screenshot of SQLite manager. 277
12.10 View from a MongoDB cloud provider. 281

14.1 A circle with Bokeh. 302


14.2 Four circles with Bokeh. 303
14.3 A simple plot with Bokeh. 305
14.4 A two data series plot with Bokeh. 306
14.5 Scatter plot graphics. 308
14.6 A heatmap out of a microarray experiment. 310
14.7 A chord diagram. 312

16.1 HTML form for sequence filtering. 327


16.2 HTML form for sequence filtering. 328

21.1 Muscle Web interface. 350

22.1 Product of Listing 22.2, using the demo dataset (NODBDEMO). 356

A.1 The git add/commit process. 369


A.2 Working with a local repository. 370
A.3 Working with both a local and remote repository as a single user. 379
A.4 Contributing to open source projects. 383

B.1 “Consoles” tab. 386


B.2 The “Web” tab. 386
B.3 Upgrading domain type option. 387
B.4 Select a web framework screen, select Bottle. 388
B.5 Select a Python and Bottle version. 389
B.6 Form to enter the path of the web app. 390
B.7 The sample web app is ready to use. 390
B.8 The “File” tab. 391
B.9 Form to create a new directory in PythonAnywhere. 391
B.10 View and upload files into your account. 391
LIST OF FIGURES  xix

B.11 Front-end of the program to calculate charge of a protein using


Bottle and hosted in PythonAnywhere. 392
Discovering Diverse Content Through
Random Scribd Documents
“Yes. That came out at the inquest. Well?”
“He told me that the thief was Miss Bostal; that he had seen her
come out of the inn on the night that an attempt was made to rob
Mr. Hemming.”
“When did he tell you this?”
“On the afternoon of the next day.”
“Why did you not say this at the inquest? Why did you let it be
thought he meant that he had seen you?”
Nell looked up with tears in her eyes.
“I was in a great difficulty. I didn’t know what to think, even then. I
had always thought Miss Theodora so good, and besides she had
been so kind to me, that I didn’t know what to believe myself. It was
all so dreadful, and I asked myself what she could do such things
for. Besides, her manner when I told her Jem Stickels had
threatened to tell the police was so cool. She didn’t seem to be in
the least concerned about it. How could I suppose it was because
she meant to get him out of the way? Oh! I can’t believe it even
now, I can’t, I can’t. Why should she do it, unless she was mad? And
there never seemed to be a trace of madness about her. I always
thought she was very clever.”
Sir Neville smiled a little at her ingenuousness. Nell herself might not
be very clever, but assuredly she was a loyal-hearted friend, to bear
the obloquy which the affair had cast upon her, without a thought of
clearing herself by betraying her friend.
But this was not, of course, the official view, which was the view he
was bound to take. He coughed severely, and gave her a keen look.
“Don’t you think,” he said, “that you were bound, in the interests of
justice, to be more frank?”
“Oh, sir, does one help the interests of justice against one’s friends?”
“One ought to,” was the prompt reply.
“And then, too, nobody asked me any questions implying any doubts
of her. They took it for granted that I was the thief, the jury did, and
everybody. You remember that, don’t you?”
Yes, Sir Neville did remember that. And looking at the candid and
sweet face in front of him, he wondered how his brother magistrates
had been such asses, and he forgot that he had been one of those
asses himself.
“Well,” he said, in a more pompous manner than ever, “you really
gave your evidence so very badly, with such an apparent absence of
straightforwardness, that there was some excuse for their mistake.”
“It was because I was so miserable, sir, more miserable than
anybody, because in a sort of way I knew the truth.”
“You should have let the jury know it, too.”
“Sir, if it had been only the thefts I would have done so,” answered
she, earnestly. “I was in so much trouble with my suspicions that I
had asked one of my friends”—her blush betrayed her—“to come
and see me, that I might ask his advice about it. But before I had
time to tell him what I was afraid of, the murder happened. And
then I didn’t dare.”
“Well, well, it was a great pity,” said Sir Neville. “You would have
saved yourself a lot of misery, and it would have done the lady no
harm, as you see. And now I want some information, if you please,
as to the night of the murder. Did you, or did you not, hear any one
go out of the house or come in, when you had come back with Miss
Bostal from your visit to Jem Stickels at his lodgings?”
“I—did hear something,” faltered Nell.
“What was it?”
“Almost as soon as Miss Bostal left me in the kitchen, I heard the
back door open and shut.”
“Ah! Did you go to see who it was that had opened the door?”
“No.”
“I suppose you had some idea in your mind about the sounds. What
was it?”
“I thought it was Miss Theodora. She was always running in and out
of the garden, feeding the chickens or looking for eggs or fetching
wood from the stack at the side of the house or water from the
well.”
“So that you just thought it was she, and then troubled yourself no
more about it?”
“Yes.”
“Did you hear, or think you heard, her come in again?”
There was a pause. Then Nell whispered:
“Yes.”
“When was it?”
“It was—a long while after, just before I took the tea into the dining-
room.”
Sir Neville laid down the pen which he had been holding, clasped his
hands and looked over his writing-table at her, with an air of
exasperation.
“Now, my dear girl, why on earth didn’t you tell the coroner that?”
“I couldn’t have told them that in my answers to their questions,”
answered Nell, earnestly. “Don’t you remember that all they asked
me was whether I had been outside the house, not whether I had
heard anybody else go in or out?”
Sir Neville did remember. He asked one more question.
“I have heard a report that a canvas bag containing the money
collected for the shipwrecked sailors, on the night before your uncle
went out of his mind, was found in your room. Is that true?”
“No, sir. Meg, my uncle’s servant, and I found it on the mat at the
foot of the stairs. And that is really all I have to tell, sir,” said Nell,
with an air of relief at having finished the odious recital.
“Well, that is enough for our purpose, fortunately,” said Sir Neville,
as he rose to ring the bell. “And now you must come into the
drawing-room and let Lady Neville give you a glass of wine. You are
a little bit of a heroine, although you have certainly not done much
to facilitate the course of justice,” he wound up, with a dignified
shake of the head.
But Nell refused to go to be shown off in the drawing-room, refused
even to have a glass of wine or a cup of tea brought to her in the
study before she went. She was white, trembling, miserable. But she
felt that she wanted to be alone, to cry her eyes out at the terrible
fact that she had been forced at last to assist the justice which she
would have diverted from the criminal if she could. One question,
however, she had to put in her turn before she left the presence of
the magistrate.
“They will bring it in that she was mad, of course, will they not?” she
asked, anxiously, but with an attempt to appear quite sure of his
answer.
Sir Neville’s answer was not reassuring, and the look which
accompanied it was still less so.
“That is a matter for after consideration.”
Nell walked to the door with staggering feet. Miss Theodora a
murderess! In danger of penal servitude, if not of hanging! The
thought was too overwhelmingly horrible.
Nell tottered to the cab and was driven back to her lodging at
Courtstairs in an almost fainting condition, a few minutes before the
police-sergeant who had been her escort to Sir Neville’s started for
Shingle End with a warrant for Miss Bostal’s apprehension.
CHAPTER XXIII.
It was the police-sergeant who had taken Nell Claris to Sir Neville
Bax who had brought to Shingle End the warrant for Miss Bostal’s
arrest. This warrant he had not, so far, had an opportunity of
showing to the Colonel. Now, however, that the lady had
disappeared, and it had become necessary to search the place, and
more thoroughly, the sergeant respectfully turned to the old
gentleman, to inform the latter of the authority by which he acted.
Colonel Bostal, divining the man’s intention, made a gesture of
horror, and without staying either to hear the man’s explanation or
to look at the warrant, retreated hastily into the house.
Clifford, however, caught sight of the paper in the officer’s hands,
and something of the truth was suddenly revealed to him. It flashed
upon him so abruptly, this knowledge, that the shock turned him sick
and giddy. It was some minutes before he could ask, in a hoarse and
tremulous voice:
“Is that a warrant?”
“Yes, sir.”
“For whom?”
“Miss Bostal.”
And the policeman continued his search about the garden and the
house for the lady who had so mysteriously disappeared.
“Then it is—Miss Bostal—whom George Claris wants to see?”
The innkeeper, who had now subsided into a stolid silence and
tranquility, was watching the front door of the house. It was
Hemming who answered:
“Yes, sir. He’s not quite himself yet, but he’s not too far off it to have
been of use to us. We’ve had him under our eye these last few days,
and whenever he gets the chance he makes straight for this house,
and clamors to see the woman who robbed him. So we brought him
with us to-night to confront her. She wouldn’t give us the chance till
we got the warrant.”
“She doesn’t seem to mean to give you a chance now,” observed
Clifford.
Hemming affected to think that her capture was only a matter of
minutes, as he kept to his post, watching the front of the house,
while the other men searched the premises at the back. But he
hardly looked so confident as might have been expected from his
words.
Indeed, he had cause for uneasiness. It was he who had first
conceived suspicions of Miss Theodora, and it had taken all the
ingenuity of which he was master to get together enough evidence
against her to justify him in asking for a warrant. The sight of an old
scar on one of her little hands, on the occasion of one of his visits to
Shingle End, had suggested to him that she might have been the
woman whose hand he had burned with the fuse at the inn.
But it had been a long time before he could make out a case—not,
indeed, until he had thought of using the now half-witted George
Claris, whom he had got out of the hands of simple Nell under a
promise, which had been faithfully kept, that he should be well taken
care of, and that he should return to her very shortly. Even then the
difficulties in the way of the police had been great. At first Claris was
sullen and taciturn. No questions would obtain from him a clear
answer as to the events of the night which had turned his brain. It
was not until that very afternoon that he had accused Miss Bostal by
name of the thefts, and thus furnished the police with enough data
for further proceedings.
Clifford listened in dumb bewilderment.
“What can she have done it for? Is she mad?” asked he, presently.
Hemming shrugged his shoulders.
“Doesn’t look much like madness to have shot the man who was
going to inform against her,” said he, dryly.
“Good gracious! Then you think she—”
It was hardly conceivable to him even yet that the prim, rigorous
little old maid, who had been so much shocked at his walking along
a country road on Sunday in a light suit, could have been guilty of
the systematic crimes now laid to her charge. In the silence which
followed his words one of the two Stroan policemen came up.
“She’s got away,” said he, in a low voice. “We’ve hunted all over the
place. There’s no way by which she could have got back into the
house.”
“How could she have got far with that short start of you?” asked
Hemming, incredulously.
“I don’t know, but she’s done it. I’m going to search the house, so
you keep your eyes open.”
The front door had been left open by the Colonel, whom the
sergeant found in the dining-room, sitting with head bent over the
dying embers of the fire. The man felt sorry for him and spoke in a
subdued voice.
“Beg pardon, sir, but I shall have to search the house again.”
The old man acquiesced by a nod, and the officer withdrew. From
the ground floor to the first floor, from the first floor to the attics, he
hunted in every corner. Hardly in vain. For although he did not find
Miss Bostal, he found evidence enough of her predatory habits to
convince any jury of her guilt of the minor crime of theft at least.
Under the boards of the attics, sewn up in the mattress of the lady’s
own bed, hidden away in holes in the disused chimneys, the officer
found a hoard as varied as it was incriminating. Money, in notes and
silver and gold; jewelry, of little value for the most part and
apparently taken new from shops; half a dozen men’s watches,
pencil-cases, purses, pieces of stuff, scraps of lace, card-cases, silver
spoons and forks. These were a part only of what he found.
Covered with the dust of years most of them were; the gold and
silver tarnished and discolored with age and damp. On the whole a
fine collection, and amounting in value to some hundreds of pounds.
Nothing less than a sheet was of any use to hold the collection; and
even when the sergeant made his way down the stairs with a huge
bundle on his back he felt by no means certain that there was not
more behind.
A bent figure stood in front of him at the opening of the dining-room
door.
“Am I under arrest, too?” asked the Colonel, in tranquil tones.
“No, sir. But we’ve got to watch the house.”
“And what have you got there?”
The policeman, by the dim light of the lamp in the passage,
displayed his find in silence. In silence, also, the Colonel looked, and
immediately withdrew into the room. The sergeant left the house
and met Clifford on the little path leading to the gate. He jerked his
head back in the direction of the house.
“Sorry for the old gentleman!” said he, in a low voice. “It’s about
broke him up, has this. He’s moping there, all by himself.”
“I’ll go and sit with him, if he’ll have me,” said Clifford, who was
remorseful, knowing that he had had suspicions of the father, and
not of the daughter.
“Do, sir,” said the sergeant, who wanted a watch kept upon Miss
Bostal’s father, and was quite willing that it should be a friendly one.
So Clifford, not without diffidence, entered the house, as the
sergeant carried his bundle to the gig which was waiting for him at
the old turnpike.
The Colonel heard the slow footsteps outside the dining-room door,
and called out:
“Who’s that?”
Clifford stood in the doorway.
“It’s I, Colonel. May I come in?”
The old man raised his head quickly, and gave him a little wan smile,
as he held out his hand.
“Come in, come in; yes.”
Then, having held the young man’s warm hand in his own cold one
for a few moments, he let it fall, and, inviting him, with a gesture, to
be seated, relapsed into silence. Clifford asked him if he should
make up the fire. It was a cold evening, and the draughts had been
allowed to sweep through the house from open window to open
door.
“Yes, yes, my lad; warm yourself if you can. It would take more fire
than there is on earth to warm my old bones to-night.”
The stern sadness of his tone sent a shiver through Clifford, who,
indeed, had little comfort to give him. He had some difficulty in
getting the fire to burn up, and when at last he succeeded, he found
that the coal-scuttle was empty.
“I will fetch you some coal,” said the Colonel, who was proceeding to
rise from his chair, when Clifford stopped him.
“No. Tell me where to get it,” said he quickly, snatching up the
scuttle.
“Oh, well, if you will, you will find the lid of the water-butt on the
ground outside, at the back. If you lift it—but really I don’t like to
trouble you—you will find the entrance to the cellar underneath.”
Following this rather curious direction, Clifford went out by the back
door of the house, lifted the lid, admiring the ingenuity by which the
cellar was concealed, and began to descend the wooden steps into
the darkness below. The Colonel had provided him with a candle,
but this was suddenly extinguished as he reached the bottom step,
and at the same moment he became aware that he was not alone.
Involuntarily he uttered a little cry. A hand, the little, soft and
slender hand which he remembered so vividly, but which he had
never before identified, was placed quickly on his mouth.
“Hello!” they heard a rough man’s voice cry, muffled as it came down
into the earth from the garden above.
And Clifford heard a soft whisper in his own ear:
“The policeman! Send him away on some pretext. I only want a
moment, just one moment!”
The young man shuddered. Although he had no fear that Miss Bostal
would do him any harm, there was something uncanny about the
idea of being left alone with a murderess, deep down in the bowels
of the earth, in the grasp of the little hands that had done such
deadly work.
The policeman’s voice startled them both. He flashed his lantern
down into the cellar, but already Miss Bostal had released Clifford
and hidden herself in the corner behind the steps.
“Hello! Who’s that down there? Is it you, Mr. King?”
“Yes,” said Clifford. “I’m getting some coal. Would you ask the
Colonel for a scoop, or a shovel, or something to get it up by?”
The man flashed his lantern round the cellar once more, and
answered:
“Well, sir, I can’t go in. But I’ll call him.”
He drew back, and the moment he did so, Miss Bostal, with amazing
boldness and celerity, crept up the steps and out behind his back, as
he called to Colonel Bostal from the back doorway.
Clifford stood still, with his heart in his mouth. He was intensely
excited; he was listening with all his power. But he did not know
whether he wanted the woman to escape or whether he wanted her
to pay the penalty she so well deserved. All he knew was that the
few moments of suspense seemed never-ending. Then the voice of
the policeman, measured and calm, was heard again:
“All right, sir. He’s coming.”
She had got away, then! After all, it was no more than was to be
expected of her superhuman cunning. And, in spite of himself, he
felt an immense relief that he had helped her to escape. He could
meet, if not the policeman, at least the Colonel, with a lighter heart.
He took the shovel which was handed to him, and reappeared in the
dining-room with the coal.
The Colonel looked at him keenly and shut the door.
“Did you see—her?” he asked in a low voice.
“Yes. She got away,” answered Clifford.
The Colonel gave a sigh of relief.
“I knew, when you got the policeman to call me, that it was some
ruse of hers,” he said. “You see, Mr. King,” he went on, as the young
man reddened with surprise, “I know her tricks. I—I have waited—
for some such end as this—for twenty-five years.”
An exclamation, in which astonishment and sympathy were blended,
escaped from Clifford’s lips. Colonel Bostal rose from his chair, and
unlocking a cupboard in the corner of the room, took from it an old
desk, which he unlocked; and taking from it a bundle of cuttings
from old newspapers, put them into Clifford’s hands.
They all referred to cases of “kleptomania” which had come before
the West End magistrates from twenty-three to twenty-five years
before, in which a “ladylike young woman, of superior manner and
address,” had been charged with shoplifting.
“They all refer to my daughter,” said the Colonel, quietly. “And in all
we managed to get her off, on the plea that she had suffered from
hysteria. And that was true.”
“Then she is not responsible for her actions?” suggested Clifford in a
tone of relief.
The Colonel hesitated, and then said:
“Frankly, my own belief is that she is fully responsible. She is a
highly intelligent woman, and her astuteness and cunning are
unsurpassable. There is some moral twist in her nature which causes
her to love the excitement of crime. That is my own opinion. I took
her away from London, but wherever we went, she threatened to
get herself and me into trouble, and at last I brought her here,
where it seemed that she must be honest for want of opportunity to
be anything else. And I thought, until a few weeks ago, that I had
succeeded. I swear to you I never had a suspicion that she was
mixed up with the thefts at the Blue Lion, until the inquest on young
Stickels. Then, when I saw that it lay between her and poor little
Nell Claris, I knew who was the—the culprit. But how could I confess
it? My heart bled for the poor girl, but I knew the truth must come
out, and I had not the courage to hasten its coming.”
For a long time there was silence in the little room. Then Clifford
ventured to ask:
“Do you know where she has gone?”
The Colonel shook his head.
“All I know is that whatever she has done is the best possible thing
for her own safety. I can trust her for that.”
Clifford was shocked. That the little, faded woman was a monster, an
unnatural and depraved creature without moral sense, was clear.
The Colonel rose again, locked up his desk and held out his hand to
the young man.
“Go,” said he, gravely, but kindly. “You have done all you could for
me, for us, and I thank you. Now you must leave us to take our
chance. And remember what I have said: There is very little cause to
fear on my daughter’s account.”
Thus dismissed, Clifford took leave of the old man reluctantly and
started for Courtstairs, where he easily found a lodging for the night.
On the following morning, at daybreak, there arrived at the County
Lunatic Asylum, sixteen miles from Stroan, a weird, wan object,
shoeless, wild-eyed, voiceless with cold and with terror.
The creature cried when the porter came to her summons:
“Take me in, or I shall do myself some harm. Take me in! Take me
in!”
It was Miss Theodora.
No lunatic who had ever been admitted within the walls of the
asylum had looked half so mad as she did. The doctors saw her, and
advised her detention. And when the storm broke over her, and the
hue and cry reached the asylum, there was no doubt expressed by
any of the doctors as to her insanity. She was duly brought up
before the magistrates, remanded, brought up again; always with
the same result. She smiled, she chatted; she appeared wholly
unconscious of her position, wholly irresponsible. And at the last her
trial for murder was avoided, the doctors all certifying that she was
unfit to plead.
And when it was announced that Miss Theodora would be confined
during Her Majesty’s pleasure, every one concurred in the justice of
the decision except Colonel Bostal, who said to Clifford, when they
were alone:
“I told you she would get off! She is so clever.”
Clifford himself did not know what to think. But then he had
something so much pleasanter to think about. For Nell Claris was no
longer able to say “No” to him. Instead of being a suspected
criminal, she was now a heroine. It was honor and not disgrace that
she could now bring to her husband.
One thing only Clifford had to wait for. Nell would not leave her
uncle until his mind was quite restored. For months she watched the
reawakening of his reason, tending him with loving care.
And when he was able to return to the Blue Lion, in full possession
of his reason, when the autumn tints were on the trees, Clifford took
his pretty and gentle bride away from the inn by the shore.
THE END.
A Woman’s Book.

The House by the River.


BY
Barbara Kent.
With Illustrations by Warren B. Davis.
12mo. 328 Pages. Handsomely Bound in Cloth. Price,
$1.00.
Paper Cover, 50 Cents.

“The House by the River” is a woman’s book from


beginning to end. It is an interesting novel, with the
principal scenes in the city of New York and in familiar
localities. In the opening of the story there is a strong
dramatic recital of events upon which the plot hinges, and
which give a deep and thrilling interest to the
development of the romance of two young lives. The
vindictiveness of a man who has been compelled to do
right under humiliating circumstances gives a strong
motive to the whole action of the story. Every reader will
be gratified by the way in which the conclusion is reached.
For sale by all booksellers and newsdealers, or sent
postpaid on receipt of price by the publishers,

ROBERT BONNER’S SONS,


Cor. William and Spruce Streets, New
York.
A Novel of Strange Adventures.

A Treasure Found—A Bride Won


BY
George E. Gardner.
With illustrations by Warren B. Davis.
12mo. 407 Pages. Handsomely Bound in Cloth. Price,
$1.00.
Paper Cover, 50 Cents.

This novel is a record of adventure in the Eastern seas,


full of strange incidents and dangers, exciting profound
interest. There is good descriptive work in the story, and it
well repays perusal for the pictures of the life and scenery
of the ocean. There is a story in it which grips attention at
the start, and never relaxes its hold upon the reader until
the end. The author has made good in this work his right
to be numbered among the popular authors who
introduce us to new and captivating fields of action. The
world is becoming so narrow and well-travelled that our
best writers enlarge its borders by the aid of imagination,
and this faculty is the secret of their charm.
For sale by all booksellers and newsdealers, or sent
postpaid on receipt of price by the publishers,

ROBERT BONNER’S SONS,


Cor. William and Spruce Streets, New
York.
TRANSCRIBER’S NOTES:
Obvious typographical errors have been corrected.
Inconsistencies in hyphenation have been
standardized.
Archaic or variant spelling has been retained.
New original cover art included with this eBook is
granted to the public domain.
*** END OF THE PROJECT GUTENBERG EBOOK MYSTERY OF THE
INN BY THE SHORE ***

Updated editions will replace the previous one—the old editions


will be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States
copyright in these works, so the Foundation (and you!) can copy
and distribute it in the United States without permission and
without paying copyright royalties. Special rules, set forth in the
General Terms of Use part of this license, apply to copying and
distributing Project Gutenberg™ electronic works to protect the
PROJECT GUTENBERG™ concept and trademark. Project
Gutenberg is a registered trademark, and may not be used if
you charge for an eBook, except by following the terms of the
trademark license, including paying royalties for use of the
Project Gutenberg trademark. If you do not charge anything for
copies of this eBook, complying with the trademark license is
very easy. You may use this eBook for nearly any purpose such
as creation of derivative works, reports, performances and
research. Project Gutenberg eBooks may be modified and
printed and given away—you may do practically ANYTHING in
the United States with eBooks not protected by U.S. copyright
law. Redistribution is subject to the trademark license, especially
commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the


free distribution of electronic works, by using or distributing this
work (or any other work associated in any way with the phrase
“Project Gutenberg”), you agree to comply with all the terms of
the Full Project Gutenberg™ License available with this file or
online at www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand,
agree to and accept all the terms of this license and intellectual
property (trademark/copyright) agreement. If you do not agree
to abide by all the terms of this agreement, you must cease
using and return or destroy all copies of Project Gutenberg™
electronic works in your possession. If you paid a fee for
obtaining a copy of or access to a Project Gutenberg™
electronic work and you do not agree to be bound by the terms
of this agreement, you may obtain a refund from the person or
entity to whom you paid the fee as set forth in paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only


be used on or associated in any way with an electronic work by
people who agree to be bound by the terms of this agreement.
There are a few things that you can do with most Project
Gutenberg™ electronic works even without complying with the
full terms of this agreement. See paragraph 1.C below. There
are a lot of things you can do with Project Gutenberg™
electronic works if you follow the terms of this agreement and
help preserve free future access to Project Gutenberg™
electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright
law in the United States and you are located in the United
States, we do not claim a right to prevent you from copying,
distributing, performing, displaying or creating derivative works
based on the work as long as all references to Project
Gutenberg are removed. Of course, we hope that you will
support the Project Gutenberg™ mission of promoting free
access to electronic works by freely sharing Project Gutenberg™
works in compliance with the terms of this agreement for
keeping the Project Gutenberg™ name associated with the
work. You can easily comply with the terms of this agreement
by keeping this work in the same format with its attached full
Project Gutenberg™ License when you share it without charge
with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.

1.E. Unless you have removed all references to Project


Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project
Gutenberg™ work (any work on which the phrase “Project
Gutenberg” appears, or with which the phrase “Project
Gutenberg” is associated) is accessed, displayed, performed,
viewed, copied or distributed:

This eBook is for the use of anyone anywhere in the United


States and most other parts of the world at no cost and
with almost no restrictions whatsoever. You may copy it,
give it away or re-use it under the terms of the Project
Gutenberg License included with this eBook or online at
www.gutenberg.org. If you are not located in the United
States, you will have to check the laws of the country
where you are located before using this eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is


derived from texts not protected by U.S. copyright law (does not
contain a notice indicating that it is posted with permission of
the copyright holder), the work can be copied and distributed to
anyone in the United States without paying any fees or charges.
If you are redistributing or providing access to a work with the
phrase “Project Gutenberg” associated with or appearing on the
work, you must comply either with the requirements of
paragraphs 1.E.1 through 1.E.7 or obtain permission for the use
of the work and the Project Gutenberg™ trademark as set forth
in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is


posted with the permission of the copyright holder, your use and
distribution must comply with both paragraphs 1.E.1 through
1.E.7 and any additional terms imposed by the copyright holder.
Additional terms will be linked to the Project Gutenberg™
License for all works posted with the permission of the copyright
holder found at the beginning of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files
containing a part of this work or any other work associated with
Project Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute


this electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the
Project Gutenberg™ License.

1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must,
at no additional cost, fee or expense to the user, provide a copy,
a means of exporting a copy, or a means of obtaining a copy
upon request, of the work in its original “Plain Vanilla ASCII” or
other form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™
works unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or


providing access to or distributing Project Gutenberg™
electronic works provided that:

• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”

• You provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt
that s/he does not agree to the terms of the full Project
Gutenberg™ License. You must require such a user to return or
destroy all copies of the works possessed in a physical medium
and discontinue all use of and all access to other copies of
Project Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of


any money paid for a work or a replacement copy, if a defect in
the electronic work is discovered and reported to you within 90
days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project


Gutenberg™ electronic work or group of works on different
terms than are set forth in this agreement, you must obtain
permission in writing from the Project Gutenberg Literary
Archive Foundation, the manager of the Project Gutenberg™
trademark. Contact the Foundation as set forth in Section 3
below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on,
transcribe and proofread works not protected by U.S. copyright
law in creating the Project Gutenberg™ collection. Despite these
efforts, Project Gutenberg™ electronic works, and the medium
on which they may be stored, may contain “Defects,” such as,
but not limited to, incomplete, inaccurate or corrupt data,
transcription errors, a copyright or other intellectual property
infringement, a defective or damaged disk or other medium, a
computer virus, or computer codes that damage or cannot be
read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except


for the “Right of Replacement or Refund” described in
paragraph 1.F.3, the Project Gutenberg Literary Archive
Foundation, the owner of the Project Gutenberg™ trademark,
and any other party distributing a Project Gutenberg™ electronic
work under this agreement, disclaim all liability to you for
damages, costs and expenses, including legal fees. YOU AGREE
THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE, STRICT
LIABILITY, BREACH OF WARRANTY OR BREACH OF CONTRACT
EXCEPT THOSE PROVIDED IN PARAGRAPH 1.F.3. YOU AGREE
THAT THE FOUNDATION, THE TRADEMARK OWNER, AND ANY
DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE LIABLE
TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL,
PUNITIVE OR INCIDENTAL DAMAGES EVEN IF YOU GIVE
NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you


discover a defect in this electronic work within 90 days of
receiving it, you can receive a refund of the money (if any) you
paid for it by sending a written explanation to the person you
received the work from. If you received the work on a physical
medium, you must return the medium with your written
explanation. The person or entity that provided you with the
defective work may elect to provide a replacement copy in lieu
of a refund. If you received the work electronically, the person
or entity providing it to you may choose to give you a second
opportunity to receive the work electronically in lieu of a refund.
If the second copy is also defective, you may demand a refund
in writing without further opportunities to fix the problem.

1.F.4. Except for the limited right of replacement or refund set


forth in paragraph 1.F.3, this work is provided to you ‘AS-IS’,
WITH NO OTHER WARRANTIES OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.

1.F.5. Some states do not allow disclaimers of certain implied


warranties or the exclusion or limitation of certain types of
damages. If any disclaimer or limitation set forth in this
agreement violates the law of the state applicable to this
agreement, the agreement shall be interpreted to make the
maximum disclaimer or limitation permitted by the applicable
state law. The invalidity or unenforceability of any provision of
this agreement shall not void the remaining provisions.

1.F.6. INDEMNITY - You agree to indemnify and hold the


Foundation, the trademark owner, any agent or employee of the
Foundation, anyone providing copies of Project Gutenberg™
electronic works in accordance with this agreement, and any
volunteers associated with the production, promotion and
distribution of Project Gutenberg™ electronic works, harmless
from all liability, costs and expenses, including legal fees, that
arise directly or indirectly from any of the following which you
do or cause to occur: (a) distribution of this or any Project
Gutenberg™ work, (b) alteration, modification, or additions or
deletions to any Project Gutenberg™ work, and (c) any Defect
you cause.

Section 2. Information about the Mission


of Project Gutenberg™
Project Gutenberg™ is synonymous with the free distribution of
electronic works in formats readable by the widest variety of
computers including obsolete, old, middle-aged and new
computers. It exists because of the efforts of hundreds of
volunteers and donations from people in all walks of life.

Volunteers and financial support to provide volunteers with the


assistance they need are critical to reaching Project
Gutenberg™’s goals and ensuring that the Project Gutenberg™
collection will remain freely available for generations to come. In
2001, the Project Gutenberg Literary Archive Foundation was
created to provide a secure and permanent future for Project
Gutenberg™ and future generations. To learn more about the
Project Gutenberg Literary Archive Foundation and how your
efforts and donations can help, see Sections 3 and 4 and the
Foundation information page at www.gutenberg.org.

Section 3. Information about the Project


Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-
profit 501(c)(3) educational corporation organized under the
laws of the state of Mississippi and granted tax exempt status
by the Internal Revenue Service. The Foundation’s EIN or
federal tax identification number is 64-6221541. Contributions
to the Project Gutenberg Literary Archive Foundation are tax
deductible to the full extent permitted by U.S. federal laws and
your state’s laws.

The Foundation’s business office is located at 809 North 1500


West, Salt Lake City, UT 84116, (801) 596-1887. Email contact
links and up to date contact information can be found at the
Foundation’s website and official page at
www.gutenberg.org/contact
Section 4. Information about Donations to
the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission
of increasing the number of public domain and licensed works
that can be freely distributed in machine-readable form
accessible by the widest array of equipment including outdated
equipment. Many small donations ($1 to $5,000) are particularly
important to maintaining tax exempt status with the IRS.

The Foundation is committed to complying with the laws


regulating charities and charitable donations in all 50 states of
the United States. Compliance requirements are not uniform
and it takes a considerable effort, much paperwork and many
fees to meet and keep up with these requirements. We do not
solicit donations in locations where we have not received written
confirmation of compliance. To SEND DONATIONS or determine
the status of compliance for any particular state visit
www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states


where we have not met the solicitation requirements, we know
of no prohibition against accepting unsolicited donations from
donors in such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot


make any statements concerning tax treatment of donations
received from outside the United States. U.S. laws alone swamp
our small staff.

Please check the Project Gutenberg web pages for current


donation methods and addresses. Donations are accepted in a
number of other ways including checks, online payments and
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!

ebookfinal.com

You might also like