Bioperl is a collection of more than Perl modules for bioinformatics that have been written and maintained by an international group of volunteers. One of the most difficult things about Bioperl is getting started using it. This is due to a scarcity of good documentation which is being rectified as well as the sheer size of the Bioperl module library. This chapter will help you get started using the Bioperl project software; it will guide you through the initial steps of getting the software, installing it, and exploring the tutorial and example material that it provides. After working through this chapter, you'll be well prepared to delve deeper into the riches of Bioperl, and, if you've also worked through the object-oriented chapters earlier in this book, you'll be in a good position to read the Bioperl code and contribute to the project yourself. The modules in Bioperl are written in the object-oriented style.
|Published (Last):||17 June 2011|
|PDF File Size:||13.18 Mb|
|ePub File Size:||17.43 Mb|
|Price:||Free* [*Free Regsitration Required]|
To check that things were working okay with my new Bioperl installation, I first wrote a little test to see if a Perl program could find the Bio::Perl module:. I ran it by putting it in a file bp0. As you see, it didn't complain, which means Perl found the Bio::Perl module. If it can't find it, it will complain. When I copied the bp0. Now I knew that Bio::Perl could be found and loaded. I next tried a couple of test programs that are given in the bptutorial.
Alternately, I could have opened a window and typed at the command prompt:. I went to the section near the beginning of the document called "I. I tried the next short script from the same section of the tutorial, pasting it into a file called tut2. Here, I experienced a problem. Running the program created a page of error output, mostly formatted in HTML, which I've truncated in the output.
When I tried to cat the output file, there was nothing in it, which I verified on Linux by examining the file with ls -l , which showed that it had 0 bytes in it.
This wasn't very encouraging; the second of the two short example scripts was failing. Looking at the two programs tut1. It's running printing those What's going wrong? I started my investigation by looking at the documentation for the Bio::Perl module by typing:. Here's what I found:. That last sentence about the Args gave me a clue. I went back and looked at the failing program, which I placed in a file called tut2. In fact, it's not even defined!
I was visited by a brainwave, and I decided to put a use strict and a use warnings into the program and to declare variables with my to see what ensued:.
Well, that's pretty clear. So, I edited the file and ran it again:. Examining the roa1. I decided that was a success, albeit a qualified one: this was a spot in the documentation that could use a little attention, clearly. By the time you're reading this, it may well have been fixed. Looking at the Bio::Perl documentation, I found the following example and discussion at the very beginning.
I noticed that the code was not meant to be a running program. This is not an uncommon situation in such SYNOPSIS sections; the point is to show how individual calls can be made to methods in the class, not to demonstrate a complete working program although sometimes the code can be run exactly as is.
I had to make some changes to make this code a working, runnable program. I declared the strict and warnings pragmas and declared each variable with my. I created variables for the different sequence filenames I needed as both input and output, and I made sure that the input sequence files were on disk and of the correct variety for example, I created the array.
In the end I had this code:. As you see, I didn't check on the output of all the method calls, but the real purpose of this test of my newly installed Bioperl modules was just to see if all the modules and methods could be found and would run when called. As mentioned previously, I also added use strict; and use warnings; and declared all the variables with my.
Often, you don't see that usage in this kind of documentation; it's not required in Perl, and it may distract some readers of the documentation from the main point of showing how the methods are called. This is not an unusual omission to find in Perl class documentation, but of course, it's recommended and often very helpful, as you saw in the last section.
So, I ran my slightly edited version of the example code from the beginning of the Bio::Perl manpage, with the following results:. I looked at each of the input and output files and verified the expected contents. The following output from a listing of the files will give you an idea of what to expect although you may get different results by running the program with different input files or database lookups :.
Perhaps this bug, a disconnect between the code and the documentation, has been fixed by the time you read this. Toggle navigation. See also. Home Programming Perl for bioinformatics. To check that things were working okay with my new Bioperl installation, I first wrote a little test to see if a Perl program could find the Bio::Perl module: use Bio::Perl; I ran it by putting it in a file bp0.
Alternately, I could have opened a window and typed at the command prompt: perldoc bptutorial. Execution of tut2. Send your comments and sugges- tions preferably to one of the Bioperl mailing lists. Your participation is much appreciated. Bug reports can be submitted via email or the web: bioperl-bugs bio. The following output from a listing of the files will give you an idea of what to expect although you may get different results by running the program with different input files or database lookups : -rw-rw-r-- 1 tisdall tisdall May 5 AI Remember the name: eTutorials.
About This Book. Organization of This Book. Conventions Used in This Book. Comments and Questions. Chapter 1. Modular Programming with Perl. Chapter 2. Data Structures and String Algorithms. Chapter 3. Object-Oriented Programming in Perl. Chapter 4. Sequence Formats and Inheritance. Chapter 5. A Class for Restriction Enzymes.
Part II: Perl and Bioinformatics. Chapter 6. Perl and Relational Databases. Chapter 7. Perl and the Web. Chapter 8. Perl and Graphics. Chapter 9. Introduction to Bioperl. Part III: Appendixes. Appendix A. Perl Summary. Appendix B. Installing Perl.
Chapter 9. Introduction to Bioperl
This document is copyright Brian Osborne. It can be copied and distributed under the terms of the Perl Artistic License. This is a HOWTO that talks about using Bioperl, for biologists who would like to learn more about writing their own bioinformatics scripts using Bioperl. Bioperl is an open source bioinformatics toolkit used by researchers all over the world. What you will find is an extensive set of Perl modules that will enable you to write your own script, and a community of people who are willing to help you. The more you understand about programming the better but all efforts will be made to not introduce too much unfamiliar material.
9.3 Testing Bioperl
Bioperl is a collection of perl modules that facilitate the development of perl scripts for bioinformatics applications. As such, it does not include ready to use programs in the sense that many commercial packages and free web-based interfaces do e. Entrez, SRS. On the other hand, bioperl does provide reusable perl modules that facilitate writing perl scripts for sequence manipulation, accessing of databases using a range of data formats and execution and parsing of the results of various molecular biology programs including Blast, clustalw, TCoffee, genscan, ESTscan and HMMER. Consequently, bioperl enables developing scripts that can analyze large quantities of sequence data in ways that are typically difficult or impossible with web based systems. In order to take advantage of bioperl, the user needs a basic understanding of the perl programming language including an understanding of how to use perl references, modules, objects and methods.