COMP 364: Computer Tools for the Life Sciences

Key information

Time/place: 12:35pm-1:25pm MWF, Winter 2008 / Trottier 3120

Instructor: Prof. Ted Perkins

TA: Azin Sayad Text: "Bioinformatics, Biocomputing and Perl" by Michael Moorhouse and Paul Barry.

Prerequisites: None. This course is intended for students in life science departments with little or no computer science background. It is not open to Computer Science majors or joint majors, nor to students who have or are taking COMP 208 or COMP 250. It is a 300-level course in the Faculty of Science, and thus counts towards the overall 300-level-or-above credit totals required by some programs.

Abstract

This course provides an introduction to concepts and computational tools useful in the storage, retrieval and analysis of large / heterogeneous / distributed data sets that increasingly characterize life science and medical research. The course will cover relational databases, structured query langauge (SQL), scripting to create data analysis pipelines as well as gather information from databases on the web, elementary image and digital movie processing, and select advanced topics. The course is targeted to students in life science departments with no or little background in computer science. Many practical examples will be discussed and practiced.

Schedule

Will be filled in as we proceed. See "Preliminary Topics List" below, for broad outline of topics covered.

Note Taking Schedule

Sample solutions to Homework 1

Sample solutions to Homework 2 (Note that the TA's answer to 5A may be different from yours; it's different from what I found. He will grade this one accordingly.)

New: Sample Questions for Quiz 1

Sample solutions to Homework 3

Hand-in sheet: HandinSheet.txt. For homeworks, O = on-time, L = late, X = not handed in. For quizzes, Y = taken, N = not taken.

Lecture Date Topics & Materials
1 Jan 4 Topics: Welcome, syllabus, activating accounts.
Handout: Syllabus
2 Jan 7 Topics: Computer terminology, linux file system, terminal & terminal commands.
Lecture Notes: comp364_lec2_notes.doc
Optional Reading: A tutorial on linux at about the level we're covering it.
3 Jan 9 Topics: More terminal commands.
Lecture Notes: comp364_lec3_notes.doc
Optional Reading: A tutorial on linux at about the level we're covering it.
4 Jan 11 Topics: File permissions and changing them. Scripts.
Lecture Notes: comp364_lec4_notes.doc
Terminal Log: comp364_lec4_terminal.txt (Descriptive comments surrounded by #s)
Optional Reading: A tutorial on linux at about the level we're covering it.
Handout: Homework 1
5 Jan 14 Topics: Terminology on computer architecture and programming languages. Beginning Perl programming: print, scalar variables.
Lecture Notes: comp364_lec5_notes.pdf
Terminal Log: comp364_lec5_terminal.txt
Perl Programs: Hello.pl Vars.pl
Reading: Moorhouse and Barry Chapter 3
Optional Reading: Jamison Chapter 2
6 Jan 16 Topics: More on strings in Perl. Taking input from the keyboard. More on numbers and operators in Perl.
Lecture Notes: comp364_lec6_notes.doc
Terminal Log: comp364_lec6_terminal.txt (May be slightly different from in class. I deleted that by accident and had to recreate it.)
Perl Programs: Case.pl Term.pl Input1.pl Madlib1.pl Madlib2.pl Madlib3.pl Madlib4.pl
Reading: Moorhouse and Barry Chapter 3
Optional Reading: Jamison Chapter 2
7 Jan 18 Note: Homework 1 due by end of class.
Topics: More on number operations. Control flow, including if, if-else, while and conditions (or tests) on numbers.
Lecture Notes: comp364_lec7_notes.rtf
Terminal Log: comp364_lec7_terminal.txt
Perl Programs: Numbers.pl Compare.pl Compare2.pl Hypotenuse.pl Countdown.pl
Reading: Moorhouse and Barry Chapter 3
Optional Reading: Jamison Chapter 4
8 Jan 21 Note: Last chance for late turn in Homework 1.
Topics: More on conditions, comparisons (especially character and string comparison), logical operators !, && and ||.
Lecture Notes: comp364_lec8_notes.doc
Handout: Summary of conditions and comparisons in Perl
Reading: Moorhouse and Barry Chapter 3
Optional Reading: Jamison Chapter 4
9 Jan 23 Practice exercises: PracticeLecture9.html
10 Jan 25 Topics: Going over solutions to the practice exercises from wednesday.
Lecture Notes: comp364_lec10_notes.doc
11 Jan 28 Handout: Homework 2
Topics: Boolean logic, including the operators !, && and !!, truth tables, and various "laws" of Boolean logic.
Lecture Notes: comp364_lec11_notes.pdf
Optional Reading: Wikipedia's entry on Boolean logic (But beware they show truth tables in a different -- worse! -- way than I presented them.)
12 Jan 30 Topics: Arrays (mostly) and hashes (a brief intro only)
Lecture Notes: comp364_lec12_notes.doc
Reading: Moorhouse and Barry Chapter 4
Optional Reading: Jamison Chapter 3
13 Feb 1 Topics: Sorting arrays ASCII-betically or numerically, looping through arrays
Lecture Notes: comp364_lec13_notes.doc or comp364_lec13_notes.txt
Terminal Log: comp364_lec13_terminal.txt
Perl Programs: Sort.pl Sort2.pl Big.pl IsIn.pl
14 Feb 4 Topics: Array indexing
Lecture Notes: comp364_lec14_notes.doc or comp364_lec14_notes.pdf
15 Feb 6 Note: Homework 2 due by end of class.
Topics: Hashes
Lecture Notes: comp364_lec15_notes.doc
Terminal Log: comp364_lec15_terminal.txt
Perl Program: Squares.pl
16 Feb 8 Note: Last chance for late turn in Homework 2.
Topics: Hashes
Lecture Notes: comp34_lec16_notes.doc
Terminal Log: comp364_lec16_terminal.txt
Perl Programs: PrintHash.pl PrintHash2.pl PrintHash3.pl CountWords.pl
17 Feb 11 Topics: Discussion of some of the sample quiz questions, array and hash problems
Lecture Notes: comp364_lec17_notes.doc or comp364_lec17_notes.txt
18 Feb 13 Quiz 1!
The quiz itself: Quiz1.html
Sample solutions: Quiz1Soln.html
19 Feb 15 Topics: Array and hash problems
Lecture Notes: comp364_lec19_notes.rtf
Terminal Log: comp364_lec19_terminal.txt
Perl Programs: RemDup2.pl RemDup3.pl RemDup4.pl
20 Feb 18 Handout: Homework 3
21 Feb 20 Topics: The join and split functions. Beginning pattern matching.
Readings: Jamison 3.3.4 for join. For split, look on-line. Pattern matching is Ch. 7 in Moorhouse, and Ch. 6 in Jamison.
Lecture Notes: comp364_lec21_notes.doc
Terminal Log: comp364_lec21_terminal.txt
Perl Program and Data: EachOnALine.pl EachOnALine2.pl Ishmael.pl MobyDick.txt
22 Feb 22 Topics: Pattern matching: Alternation and character classes.
Readings: Ch. 7 in Moorhouse, and Ch. 6 in Jamison.
Lecture Notes: comp364_lec22_notes.doc
Terminal Log: comp364_lec22_terminal.txt
Perl Program and Data: FirstOccur.pl FirstOccur2.pl Gal4.txt
23 Mar 3 Topics: Pattern matching: Brief review and repetition.
Readings: Ch. 7 in Moorhouse, and Ch. 6 in Jamison.
Lecture Notes: comp364_lec23_notes.rtf or comp364_lec23_notes.doc
Terminal Log: comp364_lec23_terminal.txt
Perl Program and Data: Pat1.pl Pat2.pl Pat3.pl Pat4.pl Pat5.pl Pat6.pl
24 Mar 5 Topics: Pattern matching
Readings: Ch. 7 in Moorhouse, and Ch. 6 in Jamison.
Lecture Notes: comp364_lec24_notes.pdf [Note, however, that the last few examples, which were done on the board, are wrong. As explained in lecture 27 / March 12, parentheses in a pattern affect what is returned by the global search. The last few examples here would be correct if the "(" in the pattern were replaced by "(?:".]
Terminal Log: comp364_lec24_terminal.txt
Perl Program and Data: Hb.txt AASearch.pl
25 Mar 7 Topics: Pattern matching: More example problems.
Readings: Ch. 7 in Moorhouse, and Ch. 6 in Jamison.
Lecture Notes: comp364_lec25_notes.doc
Terminal Log: comp364_lec25_terminal.txt
Perl Program and Data: Hb.txt Intron1.pl Intron2.pl Intron3.pl Tent1.pl Tent2.pl
26 Mar 10 Topics: Pattern matching: More example problems.
Readings: Ch. 7 in Moorhouse, and Ch. 6 in Jamison.
Lecture Notes: comp364_lec26_notes.doc
Terminal Log: comp364_lec26_terminal.txt
Perl Program and Data: Exon0.txt Exon1.txt Exon2.txt FindAspartic.pl FindAspartic2.pl CountAspartic.pl DNAtoAAS.pl
27 Mar 12 Topics: Some tips and hints, for HW3 and in general.
Lecture Notes: comp364_lec27_notes.doc
28 Mar 14 Topics: Images: Pixel-based vs. object-based. Colors. File formats.
Lecture Notes: comp364_lec28_notes.doc
Programs and data: Expr_BcdLate.jpg Expr_BcdLate.pbm MyImage.pbm MyPic2.pl MyPic2.pbm
29 Mar 17 Topics: Images: More on colors, greyscale and color images. Computing the total intensity of an image.
Lecture Notes: comp364_lec29_notes.rtf
Terminal Log: comp364_lec29_terminal.txt
Programs and data: e_coli-dk.jpg e_coli-dk.pgm e_coli-dk.ppm TotalIntensity.pl Test.pgm
30 Mar 19 Quiz 2!
31 Mar 20 Handout: HW4.html
32 Mar 26 Topics: Image file sizes and compression
Lecture Notes: comp364_lec32_notes.doc
Example images: logo.jpg logo.ppm logo-raw.ppm
33 Mar 28 Topics: Relational databases. SQL: Table creation, adding data, selection.
Lecture Notes: comp364_lec33_notes.doc
Terminal Log: comp364_lec33_terminal.txt
Reading: Ch. 12 in Moorhouse
Supplementary Material: SQL tutorial
34 Mar 31 Topics: More SQL: Selection, 3-valued logic, backing up a table, deleting rows
Lecture Notes: comp364_lec34_notes.doc
Terminal Log: comp364_lec34_terminal.txt
Supplementary Material: SQL tutorial
35 Apr 2 Topics: SQL: Deleting rows, updating info, group function in SELECT
Lecture Notes: comp364_lec35_notes.doc
Terminal Log: comp364_lec35_terminal.txt
Supplementary Material: SQL tutorial
36 Apr 4 Handout: Homework 5
Topics: SQL: GROUP BY, SELECTing from multiple tables
Lecture Notes: comp364_lec36_notes.doc
Terminal Log: comp364_lec36_terminal.txt
Supplementary Material: SQL tutorial
37 Apr 7 Topics: Multi-table SELECT queries Lecture Notes: comp364_lec37_notes.rtf
Terminal Log: comp364_lec37_terminal.txt
Supplementary Material: SQL tutorial
38 Apr 9 Topics: More on multi-table queries, variables, views
Lecture Notes: comp364_lec38_notes.rtf
Terminal Log: comp364_lec38_terminal.txt
Supplementary Material: SQL tutorial
39 Apr 11

Preliminary Topics List

  1. Perl scripting
  2. Relational databases
  3. Data on the web
  4. Digital image and movie processing
  5. Select advances topics, such as: