1. UNIVERSITY OF MIAMI
DEPARTMENT OF BIOLOGY
Course Title Perl Programming Lab
Term Spring 2009
Number BIL 575
Class Meeting Tue, 11:00-1:50PM Room Cox 108
Name/Title Dr. Patricia Buendia
Office location 234 A
Web Page http://www.bio.miami.edu/pbuendia
The Perl programming lab is for students who have little or no programming experience. The
objective of the lab is to teach students to write computer code that will automate and speed
up their genetic and genomic data analysis and provide new ways to explore the data to
advance knowledge discovery in biology. Each lab will start with a 40 minutes lecture in
which we discuss new syntax and programming elements and the rest of the time will be spent
on hands-on programming assignments using real genetic/genomic/proteomic data sets.
Students will be monitored and will get help in completing their assignments. Students are
encouraged to bring their own data sets for analysis during the last portion of the semester.
Students will learn to use Perl regular expressions, arrays and hashes, Perl packages to read
XML files with gene data, file handling routines, learn to call external programs and to use
the Bioperl toolkit. The Bioperl toolkit provides additional modules to allow Perl programs
access and process gene and genome sequence data. Some of the functions offered by Bioperl
are Blast, conversion of sequence formats, sequence alignments, calculation of selection
pressure, among many others.
In a popular Perl book, “Programming Perl” (published by O'Reilly Media), the programming
language is described as: "Perl is a language for getting your job done." Perl has several
mottos that convey aspects of its design and use. One is "There's more than one way to do it."
(TIMTOWTDI, usually pronounced 'Tim Toady'). Others are "Perl: the Swiss Army
2. Chainsaw of Programming Languages". A stated design goal of Perl is to make easy tasks
easier and difficult tasks possible.
No textbook is required.
I will post links to files with instructions and code on the course’s web site.
There are many free online resources:
• Programming Perl: http://www.unix.com.ua/orelly/perl/prog3/index.htm
• O’Reilly Beginner's Introduction to Perl: http://www.perl.com/pub/a/2008/04/23/a-
• A Perl Tutorial http://www.civeng.carleton.ca/Courses/Grad/1994-
• Essential Perl: http://cslibrary.stanford.edu/108/EssentialPerl.html
• Perl regular Expression for the common man
• Steve Litt's Perls of Wisdom
• Perl FAQ http://faq.perl.org/
There are hundreds of other tutorials and students may find their own preferred ones. In most
cases all you need to do is “google” for something related to your Perl problem. For example
if you need to know how to search for an element in a Perl array, google for “perl array
• BioPerl Wiki - Howto:Beginners http://bioperl.org/wiki/HOWTO:Beginners
The Beginners' instructions in the BioPerl Wiki covers the basic use of Bio::Seq and
Bio::SeqIO with first steps of BLAST (however we haven't installed BLAST yet).
• BioPerl Tutorial http://www.bioperl.org/Core/Latest/bptutorial.html
The excellent and comprehensive work of many BioPerl authors.
• A BioPerl course http://www.pasteur.fr/recherche/unites/sis/formation/bioperl/
A comprehensive course at the Institut Pasteur. Contains structured chapters covering
the essential aspects of BioPerl, sample data and example code, as well as references
to the BioPerl tutorial.
• Beginning Perl for Bioinformatics by James Tisdall
• Programming Perl (3rd edition) by Larry Wall (Author), Tom Christiansen (Author),
Jon Orwant (Author)
3. Lab Outline
1. Hello World: an introduction to Perl programming. How to run a Perl program. Variables and
data types and the importance of syntax.
2. Input/output and more syntax
3. Algorithms, control statements and loops
4. More control statements and loops
6. Comparing files. Combining and extracting data from different files
7. More Input/output: Process multiple files at once using open dir and readdir
8. BioPerl and object-orientation. Assignment: Count number of sequences in a Fasta file using
loops and then using Bioperl.
9. Searching for conserved motifs in a multiple alignment.
10. Using hash tables to store and sort motifs.
11. Reading splicing graphs in XML format.
12. Programming and debugging in Perl using a IDE (Eclipse with Epic) for Windows.
13. Use Bioperl to run sequence alaignments, calculate the KaKs ratio of selective pressure,
among other tasks.
14. Blast: Setting up a local sequence database and running blast queries from Perl
We will be using ActivePerl for Windows and a simple text editor for most of the course and the IDE
for the last few classes.
The topics per date will be determined during the semester.
This is a participatory course and you must be in the lab to succeed.
Out of respect for your fellow students, and me, I request that you turn up to class on time,
stay in class for the full period, avoid unnecessary noise or chatter and turn off your cell
All lab assignments are to be completed during the lab and submitted after the lab or on the
next lab meeting. If the assignment is not handed in on the due date, a grade of 0 will be
assigned. If an assignment is late due to an unforeseen circumstance please notify the
All assignments will be evaluated using the following criteria:
• Clean and correct syntax
• Correct result
In this lab, the assignments are designed to have you practice writing your own programming
code. While collaborations between students are permitted and helping each other is
4. encouraged, it is each student’s responsibility to ensure that the submitted assignments
represent their own personal work.
Grading Criteria number
Lab Assignments ~13 90%
Final Grading Scale A (A-, A, A+) B (B-, B, B+) C (C-, C, C+) D (D-, D, D+)
Percentage Score 90-100 75-89 60-74 50-59