===== Practical Introduction to Programming for Scientists ===== ==== Spring 2012 ==== === Mondays & Thursdays, 10:30 - Noon === **//Classroom changes//** Due to the number of students and scarcity of space, we will be moving from room to room a bit. Here are the rooms where we will hold class for the rest of the month: * January 12: M423 * January 19: M423 * January 23: M423 * January 26: M321 * January 30: M323 * Feb 2: M321 * Feb 6: M323 * Feb 9: M321 * Feb 13: M321 * Feb 16: M321 * Feb 20: No Class - vacation * Feb 23: M321 * Feb 27: 187A * Mar 1: 187A Since some of you don't have Blackboard access, this Wiki page will host all class material, including: * Lecture notes * Screen-capture video of each lecture (if I remember to do it every class :^/ ) * Homework assignments **Auditors are welcome**, but if possible (all students, and some others) please FORMALLY audit the class, rather than just showing up. A] this means you have at least a small commitment to actually attend and B] if you don't formally audit, the GS has no record of your interest and they may try to cancel the class, or at the very least, give a very small room to teach in. It does not take much effort to audit formally. Homework will be assigned each class, at least for the first 2/3 of the term, and is due via email to sludtke@bcm.edu , **before** the beginning of the following lecture. We will go over solutions to each homework assignment in-class. Homework is the reason for the strange schedule (M & Th). With this schedule you will always have at least two days for each homework assignment, and at least one day on which you can talk to me if you need help. Since the class is offered for credit, homework will be graded, but on a very lenient scale: 1. Homework turned in, but no reasonable attempt was made to complete the assignment 2. A good effort, but with very major flaws 3. Largely correct solution, but with some flaws 4. Program does what it should, with minimal flaws This class attracts people with widely varying backgrounds and skill levels. Since the course is targeted at people with little to no programming experience, the bar for achieving an acceptable grade (B) in the class is set pretty low. If you make a reasonable attempt at all of the homework assignments, even if not completely successful, and complete a class project of some sort, you can expect to get at least a B in the class. This does not mean you can slip through without making an effort at all. Particularly if you have no programming experience at all, the class WILL take a fair bit of work on your part. There will also be class projects in lieu of a final exam. Each person will, over the course of the term, write a program, and briefly present it at a special class at the end of the term. The sole requirement for the program is that it do something useful. We will discuss how to come up with a good project idea in class. Note for windows users. One of the students found this link useful: http://www.neuralwiki.org/index.php?title=Guide_to_installing_Python_in_Windows_Vista ==== Details on the Final Exam (Class Project) ==== //Feb 15:// If you are taking the class for a grade, please read this message carefully ! As you're aware, the term is coming to an end. We have 2 remaining lectures in class, tomorrow and a week from tomorrow (monday being a holiday). The following week is finals week. There will be no homework assigned in the last two lectures. During finals week, we have a room scheduled at the regular class time both Monday and Thursday in Room 187A. In the past, I've tried to get all of the final presentations out of the way during one class period, but with ~18 students taking the class for a grade, that's simply not practical. To be fair, here are the rules for the class project presentations: 5. The code for the class project and any necessary data to make it work must be submitted to me before the first day (10:30 AM, Mon, Feb 27), regardless of which day you present on. No revisions will be accepted after this point in time. If you end up presenting on the 2nd day, you may, of course, revise your presentation, but I cannot accept revised code. 6. The program should include comments at the top documenting it sufficiently for me to make it work. 7. Your last name should prefix the filename of code & data 8. In addition to submitting the the software/data BEFORE the 27th, immediately AFTER your presentation, you must submit your presentation slides in PDF format (PPT/Keynote if you can't do PDF). At least one slide should contain a screenshot of your program in-action. The first (title) slide must include: 9. Your name 2. The name of your class project 3. The date of your presentation 10. For those taking the class for a grade, attendance is REQUIRED on the first day. If you have already presented, attendance is optional on the second day. Those auditing are welcome to attend either/both days. 11. Each student will have 1 minute to get their laptop set up (please test it in advance on a projector somewhere) and 7 minutes to present their project & results. The presentation should include a demonstration of the program running. 12. On the first day, I will ask for volunteers to give their presentations. When there are no more volunteers, I will call names from the list of graded students randomly. 13. Remember, the class project is worth 50% of your grade ! 14. As with the homeworks, class projects will be graded leniently. Again guidelines for projects are: a. Must do something useful a. While it doesn't have to be completely novel, if there is an existing way to accomplish the same task, your program should improve on it in some way (make it easier, do more, etc.) a. Should not be completely trivial. Writing a program that takes a PDB id and downloads the corresponding structure, for example, would not be sufficient to get a good grade. a. Unlike the homework, getting a good grade on the class project requires that the project actually work. It doesn't need to do everything you originally planned for it, but what it does do must function properly. You have less than 2 weeks, so if you haven't started working on it yet, I'd encourage you to get started. Remember the general rule of thumb that however long it takes to write a program, it will generally take 1-2 times this long to debug it. ==== Examples of past class projects ==== * Analysis of DNA capture targets that failed during sequencing * Calculating the probabilities of different discrete distributions * A Candidate Gene Searcher * Calculating dN/dS automatically from pairs of orthologs by pipelining clustal and paml * 96-well reader and calculator * PCR Annealing Temperature Calculator * One click identifier for PDF files * Scraping and processing microarray data from the lab webpage ---- ||Lecture ||Notes ||Video ||Homework ||Extra Practice || ||1 - Introduction ||[[http://blake.bcm.edu/dl/EMAN2/lecture_1.pdf]] ||[[http://blake.grid.bcm.edu/dl/intro_programming_12/lecture1.mov|Lecture Video]] ||Get python working, nothing to turn in ||Syllabus & Class Info: [[http://blake.bcm.edu/dl/EMAN2/intro_prog_handout.pdf]] || ||2 - Data types and Statements ||[[http://blake.bcm.edu/dl/EMAN2/lecture_2.pdf]] ||[[http://blake.grid.bcm.edu/dl/intro_programming_12/lecture2.mov|Lecture Video]] ||[[http://blake.bcm.edu/dl/EMAN2/Homework_2.pdf]] || ||3 - Core Language Features, Cont'd ||[[http://blake.bcm.edu/dl/EMAN2/lecture_3.pdf]] ||[[http://blake.grid.bcm.edu/dl/intro_programming_12/Lecture3.mov|Lecture Video]] ||[[http://blake.bcm.edu/dl/EMAN2/Homework_3.pdf]] || ||4 - try, File I/O, argparse ||[[http://blake.bcm.edu/dl/EMAN2/lecture_4.pdf]] ||[[http://blake.grid.bcm.edu/dl/intro_programming_12/Lecture4.mov|Lecture Video]] ||[[http://blake.bcm.edu/dl/EMAN2/Homework_4.pdf]] || ||5 - Object Oriented Programming ||[[http://blake.bcm.edu/dl/EMAN2/lecture_5.pdf]] ||[[http://blake.grid.bcm.edu/dl/intro_programming_12/Lecture5.mov|Lecture Video]] [[http://blake.bcm.edu/dl/EMAN2/Terminal_5.txt]] [[http://blake.bcm.edu/dl/EMAN2/scrabble.zip|Scrabble Example Files]] ||[[http://blake.bcm.edu/dl/EMAN2/Homework_5.pdf]] [[http://blake.bcm.edu/dl/EMAN2/hw5_1.txt|Sample numbers file 1]] [[http://blake.bcm.edu/dl/EMAN2/hw5_2.txt|Sample numbers file 2]] ||[[http://blake.bcm.edu/dl/EMAN2/Practice_5.pdf]] || ||6 - Numpy/Matplotlib ||[[http://blake.bcm.edu/dl/EMAN2/lecture_6.pdf]] ||[[http://blake.grid.bcm.edu/dl/intro_programming_12/Lecture6.mov|Lecture Video]] [[http://blake.bcm.edu/dl/EMAN2/Terminal_6.txt]] ||[[http://blake.bcm.edu/dl/EMAN2/Homework_6.pdf]] ||[[http://blake.bcm.edu/dl/EMAN2/Practice_6.pdf]] || ||7 - WWW & XML ||[[http://blake.bcm.edu/dl/EMAN2/lecture_7.pdf]] ||[[http://blake.grid.bcm.edu/dl/intro_programming_12/Lecture7.mov|Lecture Video]] [[http://blake.bcm.edu/dl/EMAN2/Terminal_7.txt]] ||[[http://blake.bcm.edu/dl/EMAN2/Homework_7.pdf]] ||[[http://blake.bcm.edu/dl/EMAN2/Practice_7.pdf]] [[http://blake.bcm.edu/dl/EMAN2/example.xml]] || ||8 - Image processing & PIL ||[[http://blake.bcm.edu/dl/EMAN2/lecture_8.pdf]] ||[[http://blake.grid.bcm.edu/dl/intro_programming_12/Lecture8.mov|Lecture Video]] [[http://blake.bcm.edu/dl/EMAN2/Terminal_8.txt]] ||[[http://blake.bcm.edu/dl/EMAN2/Homework_8.pdf]] ||[[http://blake.bcm.edu/dl/EMAN2/Practice_8.pdf]] || ||9 - Guest Lecture on Regular Expressions (John Flanagan) ||[[http://blake.bcm.edu/dl/EMAN2/lecture_9.pdf]] ||[[http://blake.grid.bcm.edu/dl/intro_programming_12/Lecture9.mov|Lecture Video]] [[http://blake.bcm.edu/dl/EMAN2/Terminal_9.txt]] ||[[http://blake.bcm.edu/dl/EMAN2/Homework_9.pdf]] [[http://blake.bcm.edu/dl/EMAN2/example_seq.txt]] [[http://blake.bcm.edu/dl/EMAN2/help.txt]] [[http://blake.bcm.edu/dl/EMAN2/homework9_soln.py]]|| || ||10 - GUI Programming ||[[http://blake.bcm.edu/dl/EMAN2/lecture_10.pdf]] ||[[http://blake.grid.bcm.edu/dl/intro_programming_12/Lecture10.mov|Lecture Video]] [[http://blake.bcm.edu/dl/EMAN2/Terminal_10.txt]] ||[[http://blake.bcm.edu/dl/EMAN2/Homework_10.pdf]] Note: not due until next Thursday. If not done, previous homework can be turned in until next Monday (you can turn in a replacement if you already sent something). || || ||11 - Network Programming ||[[http://blake.bcm.edu/dl/EMAN2/lecture_11.pdf]] ||[[http://blake.grid.bcm.edu/dl/intro_programming_12/Lecture11.mov|Lecture Video]] [[http://blake.bcm.edu/dl/EMAN2/Terminal_11.txt]] ||Work on your class project || [[http://blake.bcm.edu/dl/EMAN2/client.py]] || ||12 - Databases ||[[http://blake.bcm.edu/dl/EMAN2/lecture_12.pdf]] ||[[http://blake.grid.bcm.edu/dl/intro_programming_12/Lecture12.mov|Lecture Video]] [[http://blake.bcm.edu/dl/EMAN2/Terminal_12.txt]] ||Work on your class project || || ||13 - Databases, Biopython, Debugging ||[[http://blake.bcm.edu/dl/EMAN2/lecture_13.pdf]] ||[[http://blake.grid.bcm.edu/dl/intro_programming_12/Lecture13.mov|Lecture Video]] [[http://blake.bcm.edu/dl/EMAN2/Terminal_13.txt]] ||Work on your class project || ||