output = new PrintStream(new FileOutputStream(OUTPUT_DIR + readGroup + "." + cov.getClass().getSimpleName()+ ".dat"));
} catch (FileNotFoundException e) {
System.err.println("Can't create file: " + OUTPUT_DIR + readGroup + "." + cov.getClass().getSimpleName()+ ".dat");
System.exit(-1);
}
<BUG>output.println("Covariate\tQreported\tQempirical\tnMismatches\tnBases");
for( List<? extends Comparable> covariateKey : dataManager.getCollapsedTable(iii).keySet() ) {
if( covariateKey.get(0).toString().equals(readGroup) ) {
output.print( covariateKey.get(1).toString() + "\t" );                              // Covariate
RecalDatum thisDatum = dataManager.getCollapsedTable(iii).get(covariateKey);
</BUG>
output.print( String.format("%.3f", thisDatum.getEstimatedQReported()) + "\t" );    // Qreported

output = new PrintStream(new FileOutputStream(OUTPUT_DIR + readGroup + "." + cov.getClass().getSimpleName()+ ".dat"));
} catch (FileNotFoundException e) {
System.err.println("Can't create file: " + OUTPUT_DIR + readGroup + "." + cov.getClass().getSimpleName()+ ".dat");
System.exit(-1);
}
output.println("Covariate\tQreported\tQempirical\tnMismatches\tnBases");
for( Object covariateKey : ((Map)dataManager.getCollapsedTable(iii).data.get(readGroupKey)).keySet()) {
output.print( covariateKey.toString() + "\t" );                              // Covariate
RecalDatum thisDatum = (RecalDatum)((Map)dataManager.getCollapsedTable(iii).data.get(readGroupKey)).get(covariateKey);
output.print( String.format("%.3f", thisDatum.getEstimatedQReported()) + "\t" );    // Qreported
