public String toString(int max_len) { StringBuilder sb = new StringBuilder(); // write overall TPR/FDR; sb.append("TPR,FDR,TP,FP,T,F1:\n"); sb.append("ALL"); sb.append(':'); sb.append(sum_count); sb.append('\n'); sb.append("[>=" + Constant.SVLEN + "]"); sb.append(':'); sb.append(svSumCount); sb.append('\n'); for (RatioRecord bin_count : bin_counts) { if (bin_count.getLower() > max_len) { break; } if (bin_count.isEmpty()) { continue; } sb.append(bin_count.rangeStr()); sb.append(':'); sb.append(bin_count.toString()); sb.append('\n'); } return sb.toString(); }
public void addT(int val, int referenceBases) { sum_per_base_count.incT(referenceBases); sum_count.incT(); if (val >= Constant.SVLEN) { svSumCount.incT(); } for (int i = 0; i < bin_breaks.length; i++) { if (val <= bin_breaks[i]) { bin_counts[i].incT(); return; } } bin_counts[bin_breaks.length].incT(); }
public void addFP(int val) { sum_per_base_count.incFP(val); sum_count.incFP(); if (val >= Constant.SVLEN) { svSumCount.incFP(); } for (int i = 0; i < bin_breaks.length; i++) { if (val <= bin_breaks[i]) { bin_counts[i].incFP(); return; } } bin_counts[bin_breaks.length].incFP(); }
/** * This only computes it for sum_per_base_count * * @param numNonNReferenceBases */ public void computeTN(int numNonNReferenceBases) { int conditionNegative = numNonNReferenceBases - sum_per_base_count.get_T(); sum_per_base_count.set_TN(conditionNegative - sum_per_base_count.get_FP()); }