コード例 #1
0
 private void outputMissingInterval(final IntervalStratification stats) {
   final GenomeLoc interval = stats.getInterval();
   final boolean missing[] = new boolean[interval.size()];
   Arrays.fill(missing, true);
   for (AbstractStratification sample : stats.getElements()) {
     if (hasMissingStatuses(sample)) {
       int pos = 0;
       for (AbstractStratification locus : sample.getElements()) {
         if (locus.callableStatuses().isEmpty()) {
           missing[pos] = false;
         }
         pos++;
       }
     }
   }
   int start = -1;
   boolean insideMissing = false;
   for (int i = 0; i < missing.length; i++) {
     if (missing[i] && !insideMissing) {
       start = interval.getStart() + i;
       insideMissing = true;
     } else if (!missing[i] && insideMissing) {
       final int stop = interval.getStart() + i - 1;
       outputMissingInterval(interval.getContig(), start, stop);
       insideMissing = false;
     }
   }
   if (insideMissing) {
     outputMissingInterval(interval.getContig(), start, interval.getStop());
   }
 }
コード例 #2
0
 private boolean hasMissingStatuses(AbstractStratification stats) {
   return !stats.callableStatuses().isEmpty();
 }