Genome 540 Homework Assignment 9
Due Sun March 17
- Write a program (based on the 'D-segment' pseudocode provided in lecture) to identify regions of elevated copy-number
as 'D-segments', using the number of read-starts observed at every base.
- Allow user settable parameter values
- N = Expected length of normal copy number region (state 1)
- E = Expected length of elevated copy number region (state 2)
- Use these values to set the transition probabilities: a11, a12, a21, a22.
- a12 = 1/N,
- a21 = 1/E,
- a11 and a22 will follow from these.
- Observed symbols are counts of # read-starts at each position (r = 0,1,2, >=3). The emission probabilities (e1(r), e2(r)) for each symbol r in states 1 and 2 will be given by Poisson distribution with mean=m1 for state1 and mean=m2 for state 2.
The means will be set based on the read coverage of input region. Note that counts 3 or greater are all lumped together in one category (represented by symbol ">=3") and its associated probability value should be calculated accordingly.
- The scoring scheme should be as described during lecture:
- The score contibuted by each base along the sequence will be s(r) = log2((e2(r) × a22)/(e1(r) × a11))
- S = -D = log2((a11 × a22)/(a12 × a21))
- Your program should output
- a histogram of read-start counts (i.e. number of positions with 0, 1, 2 and >=3 read-starts),
- the transition and emission probabilities,
- threshold S,
- a list of the segments (starting & ending positions, and scores),
- a score histogram (number of segments at each score value, for each score that actually occurs)
- Run the program on this file, using parameter values
- N = 1MB.
- E = 10KB.
- Mean of Poisson distribution for state 1 (m1) = 0.38 (The input was covered at 17x with 45bp reads. Thus we expect a read start on an average every 17/45 = 0.38 bases)
- Mean of Poisson distribution for state 2 (m2) = 0.57 (= 1.5 × 0.38)
- The input file has three columns: chromosome, position, and # of read-starts. The file was created based on the start positions of all reads mapping to chromosome 20 for individual NA19238, sequenced as a part of the 1000 genomes project. Sequencing was performed on the Illumina platform, and the reads were mapped to the human reference hg19 using BWA. The alignments are available on the 1000 genomes project website in BAM format.
- You must turn in your results and your computer
program, using this template file.
Please put everything into ONE plain text file - do not send an archive
of files or a tar file, or a word processing document file. Compress it (using either Unix compress, or gzip -- if
you don't have access to either of these programs let us know), and
send it as an attachment to both Phil and Sharon.
(The XML file includes a DTD, which specifies the XML file format. Place the DTD at the beginning of your XML document. When you are done with your XML check to make
sure it conforms to the DTD using this website and resolve any errors before turning it in.)
Do not forget to enclose your code in CDATA tags, and to compress your file.