About This Book
This book is a tutorial for biologists on how to program, and is
designed for beginning programmers. The examples and exercises with
only a few exceptions use biological data. The book's goal is
twofold: it teaches programming skills and applies them to
interesting biological areas.
I want to get you up and programming as quickly and painlessly as
possible. I aim for simplicity of explanation, not completeness of
coverage. I don't always strictly define the programming
concepts, because formal definitions can be distracting.
The Perl language makes it possible to start writing real programs
quickly. As you continue reading this book and the online Perl
documentation, you'll fill in the details, learn better ways of
doing things, and improve your understanding of programming concepts.
Depending on your style of learning, you can approach this material
in different ways. One way, as the King gravely said to Alice, is to
"Begin at the beginning and go on till you come to the end:
then stop." (This line from Alice in Wonderland
is often used as a whimsical definition of an algorithm.)
The material is organized to be read in this fashion, as a narrative.
Another approach is to get the programs into your computer, run them,
see what they do, and perhaps try to alter this or that in the
program to see what effect your changes have. This may be combined
with a quick skim of the text of the chapter. This is a common
approach used by programmers when learning a new language. Basically,
you learn by imitation, looking at actual programs.
Anyone wishing to learn Perl programming for bioinformatics should
try the exercises found at the end of most chapters. They are given
in approximate order of difficulty, and some of the higher-numbered
exercises are fairly challenging and may be appropriate for classroom
projects. Because there's more than one way to do things in
Perl, there is no one correct answer to an exercise. If you're
a beginning programmer, and you manage to solve an exercise in any
way whatsoever, you've succeeded at that exercise. My suggested
solutions to the exercises may be found at http://www.oreilly.com/catalog/begperlbio.
I hope that the material in this book will serve not only as a
practical tutorial, but also as a first step to a research program if
you decide that bioinformatics is a promising research direction in
itself or an adjunct to ongoing investigations.