Lesson Four: Functions and Scripts

Attached are the items for week four of the course.

 

Slides

Reading on good coding practices

Example scripts: All of these do the same thing in slightly different ways.

Example_1

Example_2

Example_3

Example_4

Cheatsheet and Extensions:

Wk4_cheatsheet

Extensions

Editing your $PATH

Homework:

Please read over the rest of the slides, the cheatsheet and extensions, and the text on editing your $PATH. The latter will help you set up your computer so that you can have one scripts folder, but can execute scripts in it from anywhere on your computer. Please also read the document on best practices for biological computing. This should give you plenty to do, so there's nothing to email in, but if you like, go ahead and start writing functions for your own datasets.  Feel free to email us with questions about those.