From: Tim F. <tfe...@br...> - 2011-10-31 13:25:54
|
Hi Kerry, I think they key here is how it's used in the following lines of code: 431 double dropout = (alignedPct - targetPct) * 100d; 432 if (dropout < 0) { 433 dropout = Math.abs(dropout); 434 435 if (i <=50) this.metrics.AT_DROPOUT += dropout; 436 if (i >=50) this.metrics.GC_DROPOUT += dropout; 437 } If the fraction of aligned reads at that GC is lower than the fraction of target bases at that GC, then dropout will become negative, indicating that there is indeed dropout at this GC fraction. The if on 432 checks this, and then abs()s the dropout number before adding it to the final metric value. This could of course be re-arranged to reverse the subtraction, reverse the IF and avoid the abs() call, but I think it's clearer this way - at least it was to me when I wrote the code! -t On Oct 21, 2011, at 4:09 PM, Kerry Cairn wrote: > > hi > > I have a question the AT/GC dropout numbers in picards CalculateHsMetrics i wondered if you could help with. > > On the picard metrics definitinon page ; > http://picard.sourceforge.net/picard-metric-definitions.shtml#HsMetrics > AT_DROPOUT is described as; > A measure of how undercovered <= 50% GC regions are relative to the mean. For each GC bin [0..50] we calculate a = % of > target territory, and b = % of aligned reads aligned to these targets. AT DROPOUT is then abs(sum(a-b when a-b < 0)). > E.g. if the value is 5% this implies that 5% of total reads that should have mapped to GC<=50% regions mapped elsewhere. > > and GC_DROPOUT as ; > A measure of how undercovered >= 50% GC regions are relative to the mean. For each GC bin [50..100] we calculate a = % of > target territory, and b = % of aligned reads aligned to these targets. GC DROPOUT is then abs(sum(a-b when a-b < 0)). > E.g. if the value is 5% this implies that 5% of total reads that should have mapped to GC>=50% regions mapped elsewhere. > > > but in the code ; > http://picard.svn.sourceforge.net/viewvc/picard/branches/1.54/src/java/net/sf/picard/analysis/directed/HsMetricsCalculator.java?revision=984&view=markup > line 431 is : double dropout = (alignedPct - targetPct) * 100d; > > Should this really be ; double dropout = (targetPct - alignedPct) * 100d; ? > > Thanks > K > ------------------------------------------------------------------------------ > The demand for IT networking professionals continues to grow, and the > demand for specialized networking skills is growing even more rapidly. > Take a complimentary Learning@Cisco Self-Assessment and learn > about Cisco certifications, training, and career opportunities. > http://p.sf.net/sfu/cisco-dev2dev_______________________________________________ > Samtools-help mailing list > Sam...@li... > https://lists.sourceforge.net/lists/listinfo/samtools-help |