code: protected List<IntervalFeatureFrequency> getIntervalFeatureFrequencies(Region region, int interval, List<Object[]> objectList,
                                                                             int numFeatures, double maxSnpsInterval) {
  
          int numIntervals = (region.getEnd() - region.getStart()) / interval + 1;
          List<IntervalFeatureFrequency> intervalFeatureFrequenciesList = new ArrayList<>(numIntervals);
  
          float maxNormValue = 1;
  
          if (numFeatures != 0) {
              maxNormValue = (float) maxSnpsInterval / numFeatures;
          }
  
          int start = region.getStart();
          int end = start + interval;
          for (int i = 0, j = 0; i < numIntervals; i++) {
              if (j < objectList.size() && ((BigInteger) objectList.get(j)[0]).intValue() == i) {
                  if (numFeatures != 0) {
                      intervalFeatureFrequenciesList.add(new IntervalFeatureFrequency(start, end,
                              ((BigInteger) objectList.get(j)[0]).intValue(), ((BigInteger) objectList.get(j)[1]).intValue(),
                              (float) Math.log(((BigInteger) objectList.get(j)[1]).doubleValue()) / numFeatures / maxNormValue));
                  } else {    // no features for this chromosome
                      intervalFeatureFrequenciesList.add(new IntervalFeatureFrequency(start, end,
                              ((BigInteger) objectList.get(j)[0]).intValue(), ((BigInteger) objectList.get(j)[1]).intValue(), 0));
                  }
                  j++;
              } else {
                  intervalFeatureFrequenciesList.add(new IntervalFeatureFrequency(start, end, i, 0, 0.0f));
              }
              start += interval;
              end += interval;
          }
  
          return intervalFeatureFrequenciesList;
      }
docs: /*
  For histograms