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:
parent
63cf7ec7ec
commit
bb36cd4adf
|
|
@ -177,11 +177,8 @@ public class GATKReport {
|
||||||
*/
|
*/
|
||||||
public void print(PrintStream out) {
|
public void print(PrintStream out) {
|
||||||
out.println(GATKREPORT_HEADER_PREFIX + getVersion().toString() + SEPARATOR + getTables().size());
|
out.println(GATKREPORT_HEADER_PREFIX + getVersion().toString() + SEPARATOR + getTables().size());
|
||||||
for (GATKReportTable table : tables.values()) {
|
for (GATKReportTable table : tables.values())
|
||||||
if (table.getNumRows() > 0) {
|
table.write(out);
|
||||||
table.write(out);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Collection<GATKReportTable> getTables() {
|
public Collection<GATKReportTable> getTables() {
|
||||||
|
|
|
||||||
|
|
@ -94,8 +94,11 @@ public class RecalibrationReport {
|
||||||
BitSet key = entry.getKey();
|
BitSet key = entry.getKey();
|
||||||
RecalDatum otherDatum = entry.getValue();
|
RecalDatum otherDatum = entry.getValue();
|
||||||
RecalDatum thisDatum = thisTable.get(key);
|
RecalDatum thisDatum = thisTable.get(key);
|
||||||
thisDatum.increment(otherDatum); // add the two datum objects into 'this'
|
if (thisDatum == null)
|
||||||
thisDatum.resetCalculatedQualities(); // reset the empirical quality to make sure the user doesn't forget to recalculate it
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue