Quick fixes to BQSRGatherer and GATKReportTable

* when gathering, be aware that some keys will be missing from some tables.
   * when a gatktable has no elements, it should still output the header so we know it had no records
This commit is contained in:
Mauricio Carneiro 2012-03-27 22:51:21 -04:00
parent 63cf7ec7ec
commit bb36cd4adf
2 changed files with 7 additions and 7 deletions

View File

@ -177,11 +177,8 @@ public class GATKReport {
*/
public void print(PrintStream out) {
out.println(GATKREPORT_HEADER_PREFIX + getVersion().toString() + SEPARATOR + getTables().size());
for (GATKReportTable table : tables.values()) {
if (table.getNumRows() > 0) {
table.write(out);
}
}
for (GATKReportTable table : tables.values())
table.write(out);
}
public Collection<GATKReportTable> getTables() {

View File

@ -94,8 +94,11 @@ public class RecalibrationReport {
BitSet key = entry.getKey();
RecalDatum otherDatum = entry.getValue();
RecalDatum thisDatum = thisTable.get(key);
thisDatum.increment(otherDatum); // add the two datum objects into 'this'
thisDatum.resetCalculatedQualities(); // reset the empirical quality to make sure the user doesn't forget to recalculate it
if (thisDatum == null)
thisDatum = otherDatum; // sometimes the datum in other won't be present in 'this'. So just assign it!
else
thisDatum.increment(otherDatum); // add the two datum objects into 'this'
thisDatum.resetCalculatedQualities(); // reset the empirical quality to make sure the user doesn't forget to recalculate it
}
}
}