General Lab Information

You can find most of the web links you need for the labs under the "links" tab on the course web site.

What you will submit for lab assignments

In each lab, you will be asked to do some bioinformatics analysis and answer some specific questions. You may also write programs. At the end of the lab period, you should minimally submit a document with the answers to these questions, and a separate python program file for each programming question, through Trunk. Make sure you and your lab partner have your names in all submitted documents.

In addition, you should create an electronic lab notebook documenting your bioinformatics analysis efforts and perhaps your program development efforts. Most people combine this notebook file with the file containing the answers to the lab questions, but you may choose to keep it separate. Discuss with your lab partner which you prefer.

You may record your lab notes and responses in any way that you choose so long as we are able to read them. A plain text file is fine: you may edit such files using Notepad++ on the lab machines. Alternatively, Microsoft Office is also available on the lab machines.

Students often ask how much detail to include in electronic lab notebooks. The answer is that you should include enough detail that someone else could reproduce your efforts. That said, it needn't be written expansively; sentence fragments and lists of options for online tools are fine for lab notebooks (although not for Project submissions).

When you are using online bioinformatics tools, you should document all options you chose and why you chose them. If you are programming in Python, your code may tell the whole story (if it is well written and includes comments), so you don't necessarily need to write anything in the notebook about programming. On the other hand, if you went through a process of trying different ideas in your program, you may want to document these design decisions or the process you followed.

Working in pairs

When working with a partner in lab, at any given time one person should be typing and the other should be closely observing and suggesting content. For programming in particular, it has been shown that working in pairs helps reduce frustration and identify errors more quickly. In a pedagogical setting, this works best when you swap roles frequently, so please remember to take turns. Counter-intuitively, it may also be more effective to have the person who is less confident about a particular part of the material be the one who types when you are working on that part.

Saving your files

Be sure to save your files in or below your home directory (drive Z:\ on the lab machines), not to the local desktop, to ensure that they will be saved once you log out and will be accessible from other lab machines.

When you are doing lab work with a partner, we strongly suggest that both of you save copies of your submissions. One simple way to do this would be to have the team member who is not logged in in lab be the one to submit the files via Trunk. Another would be to email a copy of the submission to that member of the team. Before leaving, or on another occasion, the recipient can log in to one of the lab machines, read the email or go to the Trunk site, and save the files to their own home directory.

Creating and editing Python programs

You will be writing and running your programs using a tool called IDLE. The advantage of IDLE is that it is simple to use, it offers all the functionality we need for this course, and it is available for both Mac and Windows platforms if you want to work on your own machines.

To start IDLE on the lab machines, go to Start -> All Programs -> Python 2.7, and run "IDLE (Python GUI)". This will start IDLE in the interpreter window.

To create a new python file, click on the File menu and choose "New File". This will pop up a new editor window with a blank python script. To save it, click on the File menu and select "Save". Type in the filename. For example, your file might be called "". The ".py" extension is important. It tells you - and various computer programs - that this text file contains a Python script. We suggest that you save it under your Z: directory so that it will remain available after you log out.

The first line of each Python script should be a comment line that gives both of your names. E.g.,

# This is the solution to Lab 2, problem 3, by Joe Shmoe and Penny Python

Running and testing your Python code

For now, we will run our programs within IDLE. Make sure your cursor is in the editor window. Find the Run menu at the top of the screen, and choose "Run Module" from the Run menu pulldown. After asking if it's okay to save the program first (click OK), IDLE will run your entire script in the interpreter window, where it will ask for any input and print any output.

When you try to run your script, it may not work at all if the program's syntax is incorrect. In this case, you should see an error message with a line number, or red highlighting the line where IDLE thinks your syntax error is located. Note that IDLE is not always completely accurate when reporting which line contains the error; if it really looks right to you, look at the lines just before and after as well.

Revise your program and continue to test it until you are satisfied with the results.

Submitting your work:

First, if you are working with a partner, please be sure that both of your names are in all the files you intend to upload.

You will submit your work on Trunk.

Log in to Trunk if you haven't yet done so. Select the Assignments tab, and select the appropriate lab. You should be able to submit from this page. Simply attach all of your files, including your lab notes, and submit. You should receive email confirmation of your successful submission.