Dinh/Dinh 2012/NOTES/2012-2-1
Jump to navigation
Jump to search
CpG clean up with 9 technical replicates[edit]
- QC Table
MinDepth | MaxDepth | #1 | #2 | #3 | #4 | #5 | #6 | #7 | #8 | #9 | Max QC |
10 | 15 | 0.6817395908 | 0.6154058939 | 0.7039702579 | 0.9156994632 | 0.9166079263 | 0.748925443 | 0.6921775106 | 0.6297501928 | 0.6411789537 | 0.9166079263 |
16 | 20 | 0.7315845743 | 0.6808003264 | 0.7523608921 | 0.932510164 | 0.9352472837 | 0.8202045425 | 0.7954237166 | 0.6345739228 | 0.6297127819 | 0.9352472837 |
21 | 25 | 0.752191152 | 0.7470872893 | 0.8009341253 | 0.9444102376 | 0.9355355447 | 0.8051866023 | 0.8150609428 | 0.6526182638 | 0.6774594604 | 0.9444102376 |
26 | 30 | 0.7764883293 | 0.6672828549 | 0.8350255593 | 0.9510313187 | 0.9305784138 | 0.8646749937 | 0.8093038349 | 0.6325856432 | 0.6469598754 | 0.9510313187 |
31 | 35 | 0.859329024 | 0.8751881667 | 0.8309685772 | 0.9579731713 | 0.9665702218 | 0.8793027071 | 0.8061220354 | 0.6550235987 | 0.7418632758 | 0.9665702218 |
36 | 40 | 0.862433389 | 0.7910151279 | 0.8552487229 | 0.9664141676 | 0.9567472352 | 0.8659028372 | 0.8732847674 | 0.7033501188 | 0.8825454699 | 0.9664141676 |
41 | 45 | 0.8365917898 | 0.7812320875 | 0.8852141973 | 0.9589347324 | 0.9535611664 | 0.8921469299 | 0.8233813315 | 0.7759155041 | 0.8406909511 | 0.9589347324 |
46 | 50 | 0.8153833321 | 0.9401534825 | 0.9159107514 | 0.9757519853 | 0.9614887948 | 0.8013735528 | 0.7900909278 | 0.7143071448 | 0.8217993822 | 0.9757519853 |
Max QC | 0.862433389 | 0.9401534825 | 0.9159107514 | 0.9757519853 | 0.9665702218 | 0.8921469299 | 0.8732847674 | 0.7759155041 | 0.8825454699 | ||
Max QC depth | ~38 | ~48 | ~48 | ~48 | ~33 | ~43 | ~38 | ~43 | ~38 |
- The max QC at each depth level are always at least 0.9. So at every level, an adjustment must be made to get as close to 0.9 as possible (to match the highest quality data)
- For #1 - the maximum possible QC is achieved at depth ~33 (0.86), I will use ratio 12/33 for ALL depth levels
- For #2 - the maximum possible QC is achieved at depth ~48 (0.94; next closest is 0.88), I will use ratio 12/48 for ALL depth levels
- For #3 - the maximum possible QC is achieved at depth ~48 (0.92), I will use 12/48 for ALL depth levels
- For #4 and #5, no adjustment is needed.
- For #6 - the maximum possible QC is achieved at depth ~43 (0.89), I will use 12/43 for ALL depth levels
- For #7 - the maximum possible QC is achieved at depth ~38 (0.87), I will use 12/38 for ALL depth levels
- For #8 - the maximum possible QC is achieved at depth ~43 (0.78), I will use 12/43 for ALL depth levels
- For #9 - the maximum possible QC is achieved at depth ~38 (0.88), I will use 12/38 for ALL depth levels
- Run simulation script (with ratio adjustments): File:SimulateCpG STD.txt
Take as input the methylation matrix formated as in : (genome-miner.ucsd.edu) : /home/dinh/Tech_Rep_9/NA12156_Depth10methyl_min7_minSTD0
Details of simulation[edit]
- At each CpG simulate the standard deviation 1000 times
- Each simulation is consist of:
1) obtain a simulated mC value using the observed (adjusted read depth) for each replicate and the estimated mC (average mC) 2) calculate the standard deviation of mC values across the replicates. 3) increment count if the the standard deviation is greater than or equal to the observed standard deviation at that CpG
- the p value is the count over 1000 simulations.
- since the standard deviation at methylation frequency of 0 and 1 are very small, we can use a minimum observed standard deviation of maybe 0.1 as cut off ( so if p-value is very low but standard deviation < 0.1, we will keep the CpG).
- The simulation returns p-value for each CpG. We'll use both standard deviation > 0.1 and p-value < 0.05 to reject CpG site in a separate script.