public RecalibrationTables(StandardCovariateList covariates, final int numReadGroups) {
    this.covariates = covariates;
    this.additionalTables = new ArrayList<>();
    this.allTables = new ArrayList<>();
    this.covariateToTable = new LinkedHashMap<>();
    this.tableToCovariate = new LinkedHashMap<>();

    this.qualDimension = covariates.getQualityScoreCovariate().maximumKeyValue() + 1;
    this.numReadGroups = numReadGroups;

    // two special tables
    this.readGroupTable = new NestedIntegerArray<>(numReadGroups, eventDimension);
    allTables.add(readGroupTable);
    covariateToTable.put(covariates.getReadGroupCovariate(), readGroupTable);
    tableToCovariate.put(readGroupTable, covariates.getReadGroupCovariate());

    this.qualityScoreTable = makeQualityScoreTable();
    allTables.add(qualityScoreTable);
    covariateToTable.put(covariates.getQualityScoreCovariate(), qualityScoreTable);
    tableToCovariate.put(qualityScoreTable, covariates.getQualityScoreCovariate());

    // Non-special tables
    for (Covariate cov : covariates.getAdditionalCovariates()) {
      final NestedIntegerArray<RecalDatum> table =
          new NestedIntegerArray<>(
              numReadGroups, qualDimension, cov.maximumKeyValue() + 1, eventDimension);
      additionalTables.add(table);
      allTables.add(table);
      covariateToTable.put(cov, table);
      tableToCovariate.put(table, cov);
    }
  }
 public RecalibrationTables(final StandardCovariateList covariates) {
   this(covariates, covariates.getReadGroupCovariate().maximumKeyValue() + 1);
 }