fixed estimated Q reported calculation in the gatherer
This commit is contained in:
parent
8a9fb514b6
commit
f80bd4276a
|
|
@ -109,7 +109,6 @@ public class RecalDatum extends RecalDatumOptimized {
|
||||||
|
|
||||||
public final void resetCalculatedQualities() {
|
public final void resetCalculatedQualities() {
|
||||||
empiricalQuality = 0.0;
|
empiricalQuality = 0.0;
|
||||||
estimatedQReported = 0.0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private double calcExpectedErrors() {
|
private double calcExpectedErrors() {
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ public class RecalibrationReport {
|
||||||
GATKReportTable argumentTable; // keep the argument table untouched just for output purposes
|
GATKReportTable argumentTable; // keep the argument table untouched just for output purposes
|
||||||
RecalibrationArgumentCollection RAC; // necessary for quantizing qualities with the same parameter | todo -- this should be a new parameter, not necessarily coming from the original table parameter list
|
RecalibrationArgumentCollection RAC; // necessary for quantizing qualities with the same parameter | todo -- this should be a new parameter, not necessarily coming from the original table parameter list
|
||||||
|
|
||||||
private static String UNRECOGNIZED_REPORT_TABLE_EXCEPTION = "Unrecognized table. Did you add an extra required covariate? This is a hard check that needs propagate through the code";
|
private static String UNRECOGNIZED_REPORT_TABLE_EXCEPTION = "Unrecognized table. Did you add an extra required covariate? This is a hard check.";
|
||||||
|
|
||||||
public RecalibrationReport(final File RECAL_FILE) {
|
public RecalibrationReport(final File RECAL_FILE) {
|
||||||
GATKReport report = new GATKReport(RECAL_FILE);
|
GATKReport report = new GATKReport(RECAL_FILE);
|
||||||
|
|
@ -77,10 +77,11 @@ public class RecalibrationReport {
|
||||||
/**
|
/**
|
||||||
* Combines two recalibration reports by adding all observations and errors
|
* Combines two recalibration reports by adding all observations and errors
|
||||||
*
|
*
|
||||||
* Note: This method DOES NOT recalculate the empirical qualities and quantized qualities. You have to recalculate them
|
* Note: This method DOES NOT recalculate the empirical qualities and quantized qualities. You have to recalculate
|
||||||
* after combining. The reason for not calculating it is because this function is inteded for combining a series of
|
* them after combining. The reason for not calculating it is because this function is inteded for combining a
|
||||||
* recalibration reports, and it only makes sense to calculate the empirical qualities and quantized qualities after all
|
* series of recalibration reports, and it only makes sense to calculate the empirical qualities and quantized
|
||||||
* the recalibration reports have been combined. Having the user recalculate when appropriate, makes this method faster
|
* qualities after all the recalibration reports have been combined. Having the user recalculate when appropriate,
|
||||||
|
* makes this method faster
|
||||||
*
|
*
|
||||||
* Note2: The empirical quality reported, however, is recalculated given its simplicity.
|
* Note2: The empirical quality reported, however, is recalculated given its simplicity.
|
||||||
*
|
*
|
||||||
|
|
@ -97,7 +98,7 @@ public class RecalibrationReport {
|
||||||
if (thisDatum == null)
|
if (thisDatum == null)
|
||||||
thisDatum = otherDatum; // sometimes the datum in other won't be present in 'this'. So just assign it!
|
thisDatum = otherDatum; // sometimes the datum in other won't be present in 'this'. So just assign it!
|
||||||
else
|
else
|
||||||
thisDatum.increment(otherDatum); // add the two datum objects into 'this'
|
thisDatum.combine(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
|
thisDatum.resetCalculatedQualities(); // reset the empirical quality to make sure the user doesn't forget to recalculate it
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ public class BQSRGathererUnitTest {
|
||||||
* @param factor 1 to test for equality, any other value to multiply the original value and match with the calculated
|
* @param factor 1 to test for equality, any other value to multiply the original value and match with the calculated
|
||||||
*/
|
*/
|
||||||
private void testTablesWithColumnsAndFactor(GATKReportTable original, GATKReportTable calculated, List<String> columnsToTest, int factor) {
|
private void testTablesWithColumnsAndFactor(GATKReportTable original, GATKReportTable calculated, List<String> columnsToTest, int factor) {
|
||||||
for (Object primaryKey : original.getPrimaryKeys()) { // tables don't necessarily have the same primary keys
|
for (Object primaryKey : original.getPrimaryKeys()) { // tables don't necessarily have the same primary keys
|
||||||
for (String column : columnsToTest) {
|
for (String column : columnsToTest) {
|
||||||
Object actual = calculated.get(primaryKey, column);
|
Object actual = calculated.get(primaryKey, column);
|
||||||
Object expected = original.get(primaryKey, column);
|
Object expected = original.get(primaryKey, column);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue