See Phred's excellent tutorial