Provide A Book Review For "Bioinformatics Programming Using Python" By Mitchell L. Model
2
5
Entering edit mode
14.8 years ago

Bioinformatics Programming Using Python

Practical Programming for Biological Data

By Mitchell L Model

alt text

Publisher: O'Reilly Media

Released: December 2009

Pages: 528

As asked by moderator Istvan Albert I made a separate question for this book review, so that the best review can come to the top.

python books • 8.7k views
ADD COMMENT
8
Entering edit mode
14.8 years ago

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)

ADD COMMENT
3
Entering edit mode

Not including BioPython because it is not supported in Python 3 sounds like a bad decision.

ADD REPLY
2
Entering edit mode

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().

ADD REPLY
0
Entering edit mode

not including BioPython because it is not supported in Python 3 seems like a terrible decision

ADD REPLY
8
Entering edit mode
14.8 years ago

I have partially read through this book. It is more software engineering oriented than bioinformatics. I have noticed many typos in the examples.

I think that covering the new Python (3.0) language was a premature undertaking that hurts the value of this book. One must realize that Python 3 is less usable for a bioinformatician as currently few if any of the scientific libraries have been ported to it. Sadly that is not a shortcoming that we can hope to see resolved any time soon.

It will probably be a decade (if ever!) that we can leave the Python 2 versions behind.

ADD COMMENT
0
Entering edit mode

Hi Istvan, I was just wondering about your last statement: do you still think it'll be a decade (i.e. another 7.7 years) until bioinformatics and Python 3 get along? I'm asking because I'm currently focusing more on Python3 rather than 2, with a goal to do bioinformatics. So far so good, but I have only done very simple things. I hope I won't run into too many problems.... Cheers, Nicolas

ADD REPLY
0
Entering edit mode

Istvan's main point is that "few if any of the scientific libraries have been ported". That was maybe true when he posted his comment, but in the meantime NumPy, SciPy and (as of last month) matplotlib have been ported to Python 3. Also, the majority of the modules in Biopython are already largely functional in Python 3.1.

ADD REPLY
0
Entering edit mode

I would not take the exact number (10 years) literally - I meant a lot more than a few years - Today I would still not take on Python 3 - there are just too many potential problems that you may run into. There is nothing worse than finding a great library that just does not work in Py3k - in fact I love the fact that Python 2.7 is stable and won't change, I know that the code I write today will run for a long time.

ADD REPLY
0
Entering edit mode

Thanks for the reply, I appreciate your point of view! This was the answer I was looking for. The "10 years" thing was just playing with words, as I assumed you were when saying a decade ;)

ADD REPLY

Login before adding your answer.

Traffic: 1479 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6