The book assumes no prior programming experience, uses real-world examples with biological data, and uses Python 3 (the programming language's first non-backwards-compatible release).
The first chapters are about primitive datatypes. At the end of each chapter there is a Tips, Traps and Trackbacks section where you can learn things that make your programming life easier, things that you have to watch out for and the meaning of some representative error messages that you might encounter.
The next chapter covers control statements and has several extended examples that are useful in the day-to-day work of a bioinformatician, like parsing Genbank files, translating RNA sequences, or constructing a table from a text file. Especially handy are the several templates that explain the general control flow . Suppose for example that you have a text file and that you need to collect all the lines that that meet both a preliminary test and a primary test. Then you just look up the template for filtered collect of roup of lines in the book:
lines = []
with open(inputfilename) as file:
for line in file:
if preliminary-test:
flag = preliminary-test(file)
lines.append(line)
return lines
Subsequent chapters explore object-oriented programming using Classes, pattern matching using regular expressions, fetching pages from the web and displaying webpages, processing HTML and XML and working with relational databases.
The last chapter introduces displaying data using graphical toolkits and as Scalable Vector Graphics. I have been enthusiastic about the last possibility ever since I read the great article How to Make a US County Thematic Map Using Free Tools on FlowingData. It hadn't occurred to me to use this technique in the context of bioinformatics.
I do miss a section on the use of matplotlib or other graphical packages that are often used. Another glaring omission is any reference to BioPython. The auther states in a mailing list message that this is because there is no Python 3 version of BioPython.
This book comes a decade after "Beginning Perl for Bioinformatics". Now that we have a good introductory level bioinformatics books in Python, I hope to see (Bio)Python gain strength in the bioinformatics community (a more in-depth description about the tension between Perl and Python can be read in the blog post Not the Biopythonista I thought I'd be)
Not including BioPython because it is not supported in Python 3 sounds like a bad decision.
nice review. just to point out, i havent read the book, but that's not valid python syntax. a function def can't have a "-" as in preliminary-test().
not including BioPython because it is not supported in Python 3 seems like a terrible decision