private void incrementCTFromRangeMaps(
     PredictedActualBinaryContingencyTable ct, RangeMap pred, RangeMap real) {
   // By looping through the predictions, can get at TP and FP
   Set<IntervalRangeMapValue> pv = pred.values();
   Iterator<IntervalRangeMapValue> pvi = pv.iterator();
   while (pvi.hasNext()) {
     IntervalRangeMapValue irmv = pvi.next();
     Set<IntervalRangeMapValue> vals = real.find(irmv.start, irmv.end);
     if (vals.size() == 0) {
       ct.incrementFP();
     } else {
       IntervalRangeMapValue val = vals.iterator().next();
       if (val.start == irmv.start && val.end == irmv.end) {
         ct.incrementTP();
       } else {
         ct.incrementFP();
       }
     }
   }
   Set<IntervalRangeMapValue> rv = real.values();
   Iterator<IntervalRangeMapValue> rvi = rv.iterator();
   while (rvi.hasNext()) {
     IntervalRangeMapValue irmv = rvi.next();
     if (!pred.hasEntry(irmv.start, irmv.end)) {
       ct.incrementFN();
     }
     Set<IntervalRangeMapValue> vals = pred.find(irmv.start, irmv.end);
     if (vals.size() == 0) {
       ct.incrementFN();
     } else {
       IntervalRangeMapValue val = vals.iterator().next();
       if (val.start == irmv.start && val.end == irmv.end) {
       } else {
         ct.incrementFN();
       }
     }
   }
 }
  private void makeExonRangeMapFrom13SV(int[] hidden, RangeMap exonsPlus, RangeMap exonsMinus) {

    int len = hidden.length;

    for (int i = 1; i < len; i++) {
      if ((!isCodingPlus(hidden[i - 1]) && (isCodingPlus(hidden[i])))) {
        int j = i;
        while ((isCodingPlus(hidden[j])) && (j < (len - 1))) {
          j++;
        }
        exonsPlus.add(i, j, new IntervalRangeMapValue(i, j, 1.0));
        // log.info("Add + "+i+" "+j);
      }
      if ((!isCodingMinus(hidden[i - 1]) && (isCodingMinus(hidden[i])))) {
        int j = i;
        while ((isCodingMinus(hidden[j])) && (j < len - 1)) {
          j++;
        }
        exonsMinus.add(i, j, new IntervalRangeMapValue(i, j, 1.0));
        // log.info("Add - "+i+" "+j);
      }
    }
  }