User Tools

Site Tools


intro_programming:ip2017

Practical Introduction to Programming for Scientists

Spring 2017

Mondays & Fridays, 9am - 10:30 N315

For several reasons I use this site rather than Blackboard, this Wiki page will host all class material, including:

I started writing an introduction to programming book some years ago, and while I haven't gotten around to finishing it, some other classes have found it a useful supplement to the class lectures, particularly for people just starting with programming. For that reason I'm making the current (very incomplete) draft of the book available to you:

Note that this class now uses Python 3.5 via a free distribution called Anaconda available for Linux, Max and Windows. By using a common environment, it is easier to deal with the differences between Python on different platforms. The default Python available on Linux and Mac is still Python 2.7. Please make sure you set up Anaconda 3.5 and use that instead.


Lecture Notes Video Homework Other
1 - Introduction http://blake.bcm.edu/dl/EMAN2/lecture_1.pdf Lecture Video 1. Take this survey: https://goo.gl/forms/irr7VmrQhaxEUYQp1
2. Email passport style photo to sludtke@bcm.edu
3. Get Anaconda Python 3.5 set up on your laptop
2 - Conditionals and Loops http://blake.bcm.edu/dl/EMAN2/lecture_2.pdf
http://blake.bcm.edu/dl/EMAN2/Lecture_2.ipynb
Lecture VideoSee last page of class noteshttp://blake.bcm.edu/dl/EMAN2/practice_soln_1.pdf
3 - Writing Programs http://blake.bcm.edu/dl/EMAN2/lecture_3.pdf
http://blake.bcm.edu/dl/EMAN2/translate.py
Lecture VideoSee last page of class notes
4 - Standard Libraries and Miscellany http://blake.bcm.edu/dl/EMAN2/lecture_4.pdf
http://blake.bcm.edu/dl/EMAN2/Lecture4.ipynb
Lecture VideoSee last page of class noteshttp://blake.bcm.edu/dl/EMAN2/two_column.txt
5 - Biopython and Numpy http://blake.bcm.edu/dl/EMAN2/lecture_5.pdf
http://blake.bcm.edu/dl/EMAN2/Lecture5.ipynb
Lecture VideoSee last page of class noteshttp://blake.bcm.edu/dl/EMAN2/reference.py
6 - OOP, XML and Networking http://blake.bcm.edu/dl/EMAN2/lecture_6.pdf
http://blake.bcm.edu/dl/EMAN2/Lecture6a.ipynb
http://blake.bcm.edu/dl/EMAN2/Lecture6b.ipynb
Lecture VideoSee last page of class notes
7 - Debugging and GUI Introhttp://blake.bcm.edu/dl/EMAN2/lecture_7.pdf
http://blake.bcm.edu/dl/EMAN2/Lecture7.ipynb
Lecture VideoSee last page of class notes
8 - Image Processing http://blake.bcm.edu/dl/EMAN2/lecture_8.pdfLecture VideoSee last page of class notes
9 - Databases and Data Compression http://blake.bcm.edu/dl/EMAN2/lecture_9.pdfLecture Video Install SSH client (if necessary)
10 - Recursion, Parsing, Qt4 http://blake.bcm.edu/dl/EMAN2/lecture_10.pdfLecture Video http://blake.bcm.edu/dl/EMAN2/scrabble_recur.pyhttp://blake.bcm.edu/dl/EMAN2/scrabble_enum.pyhttp://blake.bcm.edu/dl/EMAN2/scrabble_check.py
11 - Network Programming, Javascript, Making http://blake.bcm.edu/dl/EMAN2/lecture_11.pdfLecture Video Suggestions for Final Lecture IN CLASS MINI-LAB THIS FRIDAY
http://blake.bcm.edu/dl/EMAN2/udp_chat.py
12 - The outside world + Mini-lab http://blake.bcm.edu/dl/EMAN2/lecture_12.pdf http://blake.bcm.edu/dl/EMAN2/lab_neopixel.pdf
http://blake.bcm.edu/dl/EMAN2/lab_sensehat.pdf
http://blake.bcm.edu/dl/EMAN2/lab_camera.pdf
13 - Linux clusters http://blake.bcm.edu/dl/EMAN2/lecture_13.pdfLecture Video **IMPORTANT: BCM filtering .zip emails. Submit class projects to sludtke42@gmail.com !

Class Project Overview

The class project will count for 1/2 of your grade in the class, and will be scored on both your presentation and the program itself. You will likely have only ~5 minutes to present your projects when the time comes, but that shouldn't limit their complexity or your ambitions. It is a good idea to select a project which is somewhat ambitious but has some fallback positions in case you don't succeed in everything you had planned to do. Your initial project plan will not be a factor in your final grade. If the program meets the criteria below, even if it's very different than your original aim, you will still receive full credit.

Each person will, over the course of the term, write a program, and briefly present it at the end of the term. The sole requirements for the program are: 1. It must do something useful not easily completed with existing freely available tools 2. Not be completely trivial. The complexity of your project is expected to correspond somewhat to your level of past programming experience.

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
  • Pubmed search tool
  • Identify evolutionarily conserved water molecules in structure
  • 96-well reader and calculator
  • PCR Annealing Temperature Calculator
  • One click identifier for PDF files
  • Scraping and processing microarray data from the lab webpage

This class attracts people with widely varying backgrounds and skill levels. Since the course is supposed to be accessible to people with little to no programming experience, the bar for achieving an acceptable grade (B) in the class is set fairly 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 significant effort on your part. Those who don't make a reasonable attempt at virtually every assignment may not achieve a B. Turning in something incomplete is better than turning in nothing.

Homework will be assigned each class, due before the next class, at least for the first 2/3 of the term, and is handed in via email to the class TA, James (Michael) Bell James.Bell@bcm.edu, with a cc to sludtke@bcm.edu. We will go over solutions to homework assignments in-class. Since the class is offered for credit, homework will be graded, but on a lenient scale:

3. Homework turned in, something attempted, but not functional 4. A good effort, but with major flaws 5. Largely correct solution, but with some flaws 6. Program does what it should, with minimal flaws

Auditors are welcome, but if possible (all students, and some others) please formally audit the class, rather than just showing up. 1) this means you have at least a small commitment to actually attend and 2) if you don't formally audit, the GS has no record of your interest and they may give me a very small room to teach in next time (not that we need N315).

intro_programming/ip2017.txt · Last modified: by steveludtke