Beginning Perl for Bioinformatics
Superficially, this book isn't all that different from a lot of introductory Perl books: the Perl material starts out with an overview of the language, followed by a crash course on installing Perl, writing programs, and running them. From there, it goes on to introduce all the various language constructs, from variables to statements to subroutines, that any programmer is going to have to get comfortable with. Pretty run of the mill so far. Tisdall starts with two interesting assumptions, though: [1] that the reader may have never written a computer program before, and so needs to learn how to engineer a robust application that will do its job efficiently and well, and [2] that the reader wants to know how to write programs that can solve a series of biological problems, specifically in genetics and proteomics.
As such, there is at least as much material about the problems that a biologist faces and the places she can go to get the data she needs as there is about the issues that a Perl programmer needs to be aware of. The author introduces the reader to the basics of DNA chemistry, the cellular processes that convert DNA to RNA and then proteins, and a little bit about how and why this is important to the biologist and what sorts of information would help a biologist's research. The main sources of public genetic data are noted, and the often confusing -- and huge -- datafiles that can be obtained from these sources are examined in detail.
With the code he presents for solving these problems, Tisdall makes a point of not falling into the indecipherable-Perl trap: this is a useful language, well-suited to the essentially text-analysis problems that bioinformatics means, and he doesn't want to encourage the kind of dense, obscure, idiomatic coding style that has given Perl an undeservedly bad reputation. Some of Perl's more esoteric constructs are useful, and they show up when they're needed, but they're left out when they would only serve to confuse the reader. This is a good decision.
Rather, the focus is on teaching readers how to solve biological problems with a carefully developed library of code that happens to leverage some of Perl's most useful properties. The result is pretty much a biologist's edition of Christiansen & Torkington's Perl Cookbook or Dave Cross' Data Munging With Perl. The author presents a series of issues that a working bioinformaticist might have to deal with daily -- parsing over BLAST, GenBank, and PDB files, finding relevant motifs in that parsed data, and preparing reports about all of it. If a bioinformaticist's job is to be able to report on interesting patterns from these various sources, then following the programming techniques that Tisdall explains in clear, easy-to-follow prose would be an excellent way to go about doing it.
And when I say "programming techniques," note that I'm not specifically mentioning Perl. The code in this book is clear and organized, and all programs are carefully decomposed into logical subroutines that are then packaged up into a library file that each later sample program gets to draw from. Each new program typically contains a main section of a dozen lines of code or less, followed by no more than two or three new subroutines, along with calls to routines written earlier and called from the BeginPerlBioinfo.pm that is built up as the book progresses. Each sample is typically preceded by a description of what it's trying to accomplish and followed by a detaild description of how it was done, as well as suggestions of other ways that might have worked or not worked.
This modular approach is fantastic -- too many Perl books seem to focus so heavily on the mechanics of getting short scripts to work that they lose sight of how to build up a suite of useful methods and, from those methods, to develop ever-more-sophisticated applications. It isn't quite object-oriented programming, but that's clearly where Tisdall is headed with these samples, and given a few more chapters he probably would have started formally wrapping some of this code into OO packages.
If I have a complaint with the book, in fact, it's that Tisdall doesn't go any further: everything is good, but it ends too soon. Seemingly important topics such as OO programming, XML, graphics (charts & GUIs), CGI, and DBI are mentioned only in passing, under "further topics" in the last chapter. I also have a feeling that some of the biology was shorted, and the book barely touches upon the statistical analysis that probably is a critical aspect of the advanced bioinformaticist's toolbox. I can understand wanting to keep the length of a beginner's book relatively short, and this was probably the right decision, but it would have been nice to see some of the earlier sample problems revisited in these new contexts by, for example, formally making an OO library, showing a sample program that provided a web interface to some of the methods already written, or presenting code that presented results as XML or exchanged them with a database.
But these are minor quibbles, and if the reader is comfortable with the material up to this point, she shouldn't have a hard time figuring out how to go a step further and do these things alone. It's a solid book, and one that should be able to get people learning Perl, genetics, or both up to speed and working on real world problems quickly.
You can purchase Beginning Perl for Bioinformatics at Fatbrain. Want to see your own review here? Read the review guidelines first, then use Slashdot's webform.
then I could learn perl, biology, and Italian all at the same time.
http://rareformnewmedia.com/
"You got your Perl in my biology!"
"You got your biology in my perl!"
Two great interests that interest great together!
I like it when I see a "tie in" to another industry or scientific discipline. I could read this book, learn all about DNA, crack it with a perl script, then get served papers by $DEITY so I can be prosecuted under the DMCA.
The most important thing any republican needs to know.
Now I can convert the code for my Terminator robot from Fortran 77 to Perl! Good bye columns!
I felt the same about the lack of statistical approaches. While this book is probably great for biologists just learning to write code, for coders entering the field (bioinformatics) it contains too little biology or math to be really educational. My opinion.
What I'd love would be a dissection of the construction of various motif analysis tools, critiquing various impl's of HMMs, really going into detail. This seems like a perfect complementary work to OSS, so I might even find one, someday...
1) It is good for biologists who wants to learn how to program
2) It is not good for programmers who want to learn biology
Obviously, my friends disagree with reviewer Babbage on this point. However, a quick look on Amazon reveals that most reviewers who found the book interesting are biologists with no programming experience instead of the other way round.
"If you think education is expensive, try ignorance" - Derek Bok
Seeing a title like this, aiming a particular language at a particular discipline makes me flash back to the college days (last year) where the engineering classes all used fortran. God forbid, if perl gets outdated in another few years, are all the Biologists in the world going to lock themselves into a dead language like those stuffy engineers?
Unfortunately, after flipping through this book extensively at Barnes & Noble, I found it to be a glorified Perl string manipulation book, applied to strings of DNA info instead of "Hello World!" type data. There was only one decent chapter on specific file format conversion. Not very worthwhile in my opinion,
Wouldn't you like to be a pepper, too?
Bioinformatics is probably the biggest challenge facing the biological sciences in the next few years. Its becomming more and more apparent that even slight changes in very small elements of a system (i.e., a small sequence of a protein, the behavior of a single neuron within a group of 10,000) can have a drastic effect on the behavior of the entire system. As a result, to really study the problem, you have to aquire massive amounts of data. For example, in our lab we routinely collect data from 64 channels of 16-bit data (monitoring neuron firing in culture) at 1KHz, in addition, we're simultaneously taking calcium imaging video at 100fps at 256x256 (at 256 colors). This results in about 200 MB of data gathered every second. Considering we run tests for over 10 minutes, just aquiring and storing this data is a challenge, but finding useful methods to analyze it is even more difficult. Its refreshing to see texts being written on how to bridge the gap between comp. sci. and biology. I've been working in the area for about 4 years now, and its really great to see the field growing and getting more mainstream attention.
Some men spend their entire lives trying to kill themselves for having been born. --Ross MacDonald
As a CS person about to switch into Biology I found the reviewed book interesting. Even if you have a good handle on Perl and Biology you will find certain elements in the book intruguing.
On a personal experience side note, Perl does seem to handle genetics problems with quite a bit of ease. The ease seems to stem from Perl's obfuscation. (it also seems to confuse my Biology profs quite a bit since my answers are legitimate answers on the exams)
internet like monkeys'
They also don't mention it's a great introduction to books for those familiar with perl, biology, and bioinformatics, but not the written word!...
Recursive: Adj. See Recursive.
We were just discussing programming languages recently.
We use so-called micro-arrays frequently, which yield so much information it is not possible to go through all that manually (on average you get about 10.000 "genes" that show changes in expression, after which you have to check the intertesting ones for functionality).
At the moment we can either mess around with MS excel or buy some serious software which is so incredibly expensive only companies can afford it.
Still I doubt whether Perl should be the language of choice due to it tending to be "write-only code". Maybe this book will change my mind though.
If an experiment works, something has gone wrong.
This could spawn a great trend in cross-area programming books. Ada for Historians? Smalltalk for Hairdressers?
Algorithms on Strings, Trees, and Sequences: Computer Science and Computational Biology by Dan Gusfield is usually very liked for people with a computer science background. And it's not only of use if you want to go into bioinformatics: most algorithms on strings are usable in everyday coding too.
"If you think education is expensive, try ignorance" - Derek Bok
Human Molecular Genetics 2: Looks to be a great primer on all the biology background.
Bioinformatics: A Practical Guide...: This book is a detailed tour of the online databases and existing tools for analysis of genes and proteins.
Algorithms on Strings, Trees and Sequences: This is a book for real computer science types who want to do high-performance implementations of new tools.
At Purdue University, there is a class specifically meant for CS majors and Biology majors, to address this same issue. I wonder if they use this book in the class.
Moderation: Put your hand inside the puppet head!
The BioPerl project (http://bio.perl.org/) has been going on for some time.
In their own words they are, "The Bioperl Project is an international association of developers of open source Perl tools for bioinformatics, genomics and life science research."
There bioinformatitians can find a wealth of useful Perl scripts and modules to use in their efforts.
Yet another example of an open source initiative serving the needs of science!
This book seems to equate biology with genomics/bioinformatics, when that is simply not the case. There are a fair amount of scientists in the general school of biology who *are not* bioinformaticians. As a person who does computational ecology, this book really wouldn't help me- and I am a biologist. Sure, DNA is swell, but it won't tell us about the complex interactions between a number of populations of organisms and the environment in which they live; it doesn't provide strategies and formulas (or references to perl modules?) that *other* kinds of biologists use. ...sigh.
Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
What's the aim of this book, really? Is it meant to give the layperson in either field a hobby in the other? Are you supposed to read this and then go get a job in bioinformatics? As a Perl programmer with an interest in Biology but no formal training in it, I can say with certainty that it's not the latter. To land a job in that field you basically must have a graduate degree one of the two fields, preferably with significant formal education in the other as well.
I might pick up this book because it sounds genuinely worthwhile, but I fully expect that at the end of it I'd feel more than anything that I needed to go back to school.
Odd for me that this story was on slashdot today. I've spent the last 24 hrs lurking around the net trying to find books that'll give me a little info on bioinformatics. Anyways, I have a CS degree and I am kicking around the idea of taking Biology classes. I know a tiny bit about Biology but not any significant amount at all. I was wondering if you guys could recommend some books for a programmer in terms of bioinformatics?? I've seen the recommendations on bioinformatics.org but I want some feedback from some of you knowledgeable slashdotters. Feel free to send email.....
perl -e 'for (1..1000000) { print ${[G,T,C,A]}[int(rand() * 4)] }'
-- This is my penis. There are many like it, but this one is mine.
Anyone who wanders into the use of Perl for bioinformatics ought to consider the ultimate plunge into the use of Perl for neuroscientific Artificial Intelligence. Since v.t.y. Mentifex here has been coding the AI Brain-Mind in JavaScript for tutorial purposes and also in Forth for Intelligent Mind Roboinformatics, the switch-over to Perl is advancing so slowly that I must first promulgate some candidate AI module proposals for inclusion among the object-oriented Perl 5 Module List.
The Comprehensive Perl Archive Network (CPAN) contains some not-yet-implemented, suggested AI module namespaces for those who read the Beginning Perl book reviewed here on SlashDot and who may then wish to do some really exciting, wave-of-the-future Perl neuroscience theory and practice work.
I read it and found that it includes about 400 theorems. It is a very good book but it is *hard* for people without strong math background. Don't expect the light reading.
Mabye that's because Perl's OO support is an extremely kludged-together ugly beast that's undergoing a much-needed facelift in Perl6.
The author actually does the world a favor by not mentioning Perl and OO in the same sentence.
[[ so, when will the first International Obfuscated Perl Code Contest will come? Perl poetry is getting kinda old. ]]
<tongue-in-cheek>Wouldn't that be rather like having a International Wet Water Contest?</tongue-in-cheek>
Stuart.
If biologists are learning how to do OO, maybe I should get out my old chemistry set and try some gene-splicing :)
What's with that last couple of sentences? Did you fall out of bed this morning?
- Variable declarations
- Memory allocation
- Type conversion
Unless you're using Python in which case you have to do type conversion sometimes...Really, why scripting languages? It seems like some of these scientists are getting really good at it, using OO and everything. Why not switch over to a native language like C++ (which isn't actually that hideous if you avoid all the stupid features) and do the calculations 50 times faster?
Anyone have input?
In the San Francisco area, the Biotech companies are on a hiring swing. It's a notoriously hard area for even the strongest programmers to get a job in, unless they've worked in biotech before.
Any indications if this book (or any of the others noted here) would be enough to get someone in the door?
There's gotta be some legit way to link the two. I aim to be more than just a consumer of both ;) It's time to give a little something back to both communities I feel, it's only polite...
DataSquid.net, a little about me.
The reason engineers, and physicists, use Fortran is that, until recently, it was the best number crunching language around. C and C++ didn't get math libraries that could compete with Fortran until a couple of years ago, and no one with any sense is going to use an interpereted language for serious number crunching.
Best Slashdot Co
"The problem with doing OO is it requires you to understand software engineering. Biologists are
probably more interested in crunching their numbers than in good OO design. Or am I wrong?"
It depends what you want to do. If you are writing a few hundred lines of code, then good software enginnering is not that important. Nowadays biologists and bioinformaticts are writing very large code bases, to do very complex tasks. Under these circumstances software engineering becomes necessary.
Programming is not my area of research. Nor is enginnering, or architecture. It is however my plumbers spanner. Of course us biologists are learning how to do, and in many cases how to do it very well.
Phil
If you work on or with proteins (structural biology, biophysics, etc.) you will find this book to be largely a waste of time. An earlier slashdotter said it: there is more to biology than genomics. O'Reilly should stick to unix, leave the science for the peer-reviewed journals. Amen.
P.S. If you want an intro to some field in biology, read up on TIBS (Trends in Biological Science for the uninitiated.)
http://tinyurl.com/4ny52
You can also find a large number of open source bioinformatics projects hosted at
Bioinformatics.org
with links to BioPerl, BioPython, BioXML, BioJava, BioCORBA, and BioRuby projects on the
lower right hand side of their page.
I would like to answer several questions that were raised in this discussion.
(1) How does a CS person learn biology? I recommend "Recombinant DNA, A short Course", as an accessible (Scientific American style) introduction to the cloning breakthroughs and discoveries that lead to genome science.
(2) How does a CS person learn "Bioinformatcs"? I strongly recommend "Bioinformatics - Sequence and Genome Analysis" by David Mount as an accessible and extremely comprehensive survey of current approaches in Biological Sequence Analysis.
(3) Why do Biologists use Perl? Much of the information Biologists want is on the WWW, and Perl's LWP makes it extremely easy to get it. We don't use Perl for sophisticated text analysis (similarity searching, motif searching, etc) because the algorithms that are appropriate are typically not exact (or even regular expression) matches. But it's difficult to beat Perl for getting stuff off the WWW.
(4) Why do Biologists use Flat files? Several reasons - (a) the most useful information is sequence information, and it can be read much more quickly out of a flatfile (esp. one that is memory mapped) than a DB; (b) flat files solve some versioning problems that DB's make very complex and slow. (c) Most data providers only provide flatfiles. This will change, however, over the next 2 - 3 years, mySQL and postgresQL are moving into biology labs.
It is very exciting that Bioinformatics has high visibility now, and many people with CS background are considering bioinformatics problems. Unfortunately, many of the introductory books on bioinformatics (particularly the O'Reilly books) do not adequately present the substantial foundations of bioinformatics that have been build over the past 15 - 20 years, and some newcomers are mislead into believing there are simple problems looking for a few good programmers. Most of the simple problems have been solved; many of the complicated problems are challenging not because we do not know enough CS, but because we do not know enough biology.
Or are bioinformaticists so paranoid about others using their techniques that they don't want such a tool to be available commercially? I bet there are a ton of "trade secrets" in some of that Perl code...
At least part of the problem there is that there is no one single "requirement" for bioinformatics as a whole (except for trivial tasks like reformatting files, doing elementary transformations, accessing and retrieving stuff over the net and so on). When it comes to the big problems, every research project is different and it is a genuine handicap to not have a biological background when putting the system together. I'm not saying that a CS person couldn't do it, of course they could (almost certainly better, in fact). However, the lack of biological background would complicate and delay things down to unworkable levels when it comes to knowing where the limits of "meaning" are in the system, if you get my drift.
Do you have a link for this TIBS which you speak of? Apparently, I'm far too lazy to use google! ;)
Last night I shot an elephant in my pajamas. How he got in my pajamas I'll never know.
Since I'm a Lisp fiend: while we're on the subject of programming for bioinformatics, I'd like to point out that Allegro Common Lisp has been used by a few folks in the field. Here are two links:
Pangea Systems Inc. (now DoubleTwist) for EcoCyc.
MDL Information Systems to design new drugs.
A selection of possibly relevant books (_Introduction to Genetic Analysis_, Molecular Cell Biology_, etc) can be found at: www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=Books NSK
So far, this is the most useful comment today.
Democrats and Republicans only disagree about how to enslave you
As a professional in the feild, I have seen over and over again how using Perl in bioinformatics has crippled efforts towards a real bioinformatics infrastructure. It leads to data islands, lack of interoperability, lack of maintainability, poor code reuse, and slow development. Lack of multithreading makes it difficult to spread jobs out over multiple processsors. I think it is popular because it is easy for non-programmers to start spewing out simple text transformations. However that only gets you so far, and creating real enterprise back end needs a real language. Sometimes they try to patch things together by using the more OO-like features of Perl, but it is a loosing battle. Save yourself the grief and use Java or C++.
A little knowledge can be a dangerous thing.
http://www.elsevier.nl/locate/tibs or find it at your library.
http://tinyurl.com/4ny52
I'm a devolper working on www.neuroinformatica.com. (online microscope, with analysis and discussion of biological material)
Our customers are looking to teach, research and diagnose all sorts of stuff. We will link with some genomics information, but at the moment there is plenty of anatomy and structure to provide a context for the rest of the information.
In my mind, the goal is to simulate, and therefore understand the processes at an electrochemical level, and by putting everything into the context of a model based on real (digitized) tissue create a serious base of knowledge.
I use java more than perl. I want to be able to maintain the code over the years! I know just enough perl to know that two programmers will seldom agree on a strategy for implementing something. I want my java neuroinformatics project to be timeless.
This is a facinating time to be alive!
Celebrate Excellence!
It seems that perl is still being used purely because many bioinformatics departments are full of people who know how to program in perl. And this is because bioinformatics *used* to be pretty much only about string manipulation.
This is just not true any more - proteomics require in silico trypsin digest and algorithms for protein identification for MALDI mass spec (prediction of protein sequence via analysis of digested protein fragments); microarray experiments require cluster analysis of expression data in order to identify functinoal relationships. Added to this there are lots of issues relating to integrating the many many databases there are out there.
The systems are becoming bigger and have to deal with lots of other systems around the world. Is Perl the best language for all this? I don't know but languages shouldn't be pushed into unsuitable roles purely for historical reasons and lots of bioinformaticians are trying to do this by trying to cling onto perl.
martin
It's funny that the bioperl project is powered by Python!
Surely you jest. In my humble experience Perl .9 to .95 the performance of C code
code is about
when it come to predominately file i/o and string
manipulation tasks. Now when it come to programmer
efficiency there is no contest. A single reg exp
will replace dozens of lines of C, dynamic arrays and
and hashes are cumbersome in C and Memory worries are , etc.
Hi,
For a free microarray database and software package utilizing Perl and Linux, you might look into the following links.
Stanford Microarray Database [SMD] Package
SMD on Linux
Cheers, jcmatese
I agree, but perl is not the only language used in bioinformatics and some people do know when to use the correct language for the job in hand. There is use of SQL and C / C++ in many bioinformatics projects not forgetting good old Fortran which is used to a large extent in the Structural Biology field.
If you need to do heavy duty microarray analysis Excel and so on will definitely not do the job (as you hinted at). If you can't afford something like S-Plus to your analysis you should check out R and then get over to Terry Speed's website. Lots of good R routines there for analyzing microarray data. As for the topic at hand, i find perl very good for what we do in microarray analysis. I use it all the time for combining results, adding or updating columns in largish (around 80 Mb) data sets and so on. It's great that there's a book out there now for the biologists and i'm definitely going to buy it for at least a few people around here who constantly bug me with simple PERL questions!
There is another area of bioinformatics which uses physics based simulations of biological systems. These types of tasks have little to do with ascii file processing, and are more sheer number crunching, and involve classic simulation modelling techniques.
Some examples of these types of bioinformatics problems are:
-simulation of protein folding
-simulation of chemical reaction circuits/control mechanisms in a cell or organ system
-cellular automata simulation of a group of cells in a tissue
Because of the number crunching requirements involved, these types of tasks are usually coded in languages which are good at math and have fast compilers, such as fortran and C.
I'm just trying to mention what else is out there, so that people don't get the idea that pattern parsing is the only thing bioinformaticists do
Hi, :-)
Why dont use Euphoria?
Since the basic structure of Euphoria is the sequence, then it would be the best option for
DNA sequencing
And it beats Perl in speed!
check:
www.rapideuphoria.com
Outsourcing is no magic wand. Some one has still
got to write the software, and some one has still got to do the research. In the case of all research requirements analysis is extremely hard. If you knew what you required from the software in advance, then it probably wouldn't be research!
But yes there are lots of computer scientists in bioinformatics these days. Its a hybrid discipline. Even though my origins are as a bench biologists I consider myself to be a computer scientist at least in part these days, as well as a programmer.
Research code is often a little flaky. We are not writing finished products to sell to people. We are writing code to do research!
Phil
PHP and Python own Perl in every way. Better structure, cleaner syntax and more robust (without having hit up CPAN every 5 fuckin minutes for yet another module that has completely different usage syntax than every other module you have).
Perl is ugly and its "TMTOWTDI" design sucks ass.