Comp 7 / Bio 40 General Lab Information

Instructions that apply to all labs

You can find most of the web links you need 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 submit a written document with the answers to these questions, and a separate python program file for each programming question. We will submit these through Gradescope.

Make sure you and your lab partner have your names in all submitted documents: please write them in the Word document with your written answers, and please also put them in a comment on the first line of each Python program you write. Comment lines start with the '#' character.

Your written answers to each question should include the equivalent of an electronic lab notebook documenting your bioinformatics analysis efforts and perhaps your program development efforts (if these are too complex to document using comments in the code).

Written answers must be uploaded as a single pdf file. We suggest writing the answers in Word using Microsoft Office on the lab machines and saving the end result as a pdf. If you are using your own computer and software, you may use anything you like to write your responses so long as you save and upload the results in pdf format and we are able to read them.

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, or that you could reproduce them a month from now when you've forgotten what you did. That said, it needn't be written expansively; sentence fragments or lists of options for online tools are fine for lab notebooks (although not for Project submissions).

When you are using 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. This is more likely to be an issue in later labs.

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. It is expected that lab partners will work together to create a single program or document and that both partners will have their names on that one submission. Gradescope actually allows you to designate multiple authors for a document. Be assured that this is completely acceptable behavior for a partnered lab in this class.

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 remember to do this would be to have the team member who is not logged in in lab be the first to submit the files via Gradescope. 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 Gradescope 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, click on the Windows icon in the lower left corner. You should be given an alphabetical listing of applications. Scroll down to 'P' and click on 'Python 2.6.' This will open a listing of Python 2.6 programs, from which you will choose '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 Window". 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 "SomeName.py". 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 under "This PC", so that it will remain available after you log out.

You can also create a lab notebook using Word by clicking on the Windows icon in the lower left corner of the screen and selecting Word 2016 from the Applications icons on the upper right of the popup. Again, save your writeup somewhere in your Z: directory.

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 in Gradescope. Each of you should already have created a Gradescope login, joined the class using course entry code 92DJKE, and submitted a test file.

To submit your lab, go to the course page, click on the assignment link (e.g., "Lab 1 text"), click "submit pdf" if it is a pdf file, and upload the file.

The system will then ask you to match the pages of your uploaded pdf with the questions asked; just click on each question in the assignment outline and then select / click on the pages on which your answer appears. Some answers may take more than one page, some pages may include answers to multiple lab questions. When you are done, click the "submit" button. If you need to change your answers, there will be a "resubmit" button on the bottom right once your submission has been uploaded.

If this is a paired assignment, you should then either click the "View and edit group" link on the right hand panel, or click the bottom button "More" and choose "group members." Either will then let you add the login email of your lab partner(s) to the submission.

Once you have submitted and linked your submission to all your group members, you may log out by clicking "Account" in the lower left corner and selecting "log out." When grades or comments are available, you will be able to access them through Gradescope as well. We will return quiz grades in the same way.