Skip to content

Commit

Permalink
Revert "test (double,double) assertions made compatible with future t…
Browse files Browse the repository at this point in the history
…est framework"

This reverts commit fd8b16d.
  • Loading branch information
dror27 committed Apr 30, 2024
1 parent fd8b16d commit bd50c59
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ public void testPctRibosomalBases() throws Exception {

final RnaSeqMetrics metrics = output.getMetrics().get(0);

Assert.assertEquals(metrics.PCT_RIBOSOMAL_BASES.doubleValue(), 0.4);
Assert.assertEquals(metrics.PCT_RIBOSOMAL_BASES, 0.4);
}

public File getRefFlatFile(String sequence, String txStart, String txEnd, String cdsStart, String cdsEnd, String exonCount, String exonStarts, String exonEnds) throws Exception {
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/picard/analysis/MergeableMetricBaseTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,13 @@ public void testMerging() {
Assert.assertEquals(metric1.boxedInt, (Integer) 2);
Assert.assertEquals(metric1.unboxedInt, 4);

Assert.assertEquals(metric1.boxedDouble.doubleValue(), 6D);
Assert.assertEquals(metric1.boxedDouble, 6D);
Assert.assertEquals(metric1.unboxedDouble, 8D);

Assert.assertEquals(metric1.boxedLong, (Long) 10L);
Assert.assertEquals(metric1.unboxedLong, 12L);

Assert.assertEquals(metric1.boxedFloat.floatValue(), 14F);
Assert.assertEquals(metric1.boxedFloat, 14F);
Assert.assertEquals(metric1.unboxedFloat, 16F);

Assert.assertEquals(metric1.boxedShort, (Short) (short) 18);
Expand Down
20 changes: 10 additions & 10 deletions src/test/java/picard/analysis/TheoreticalSensitivityTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ public void testProportionsAboveThresholds() throws Exception {
final List<ArrayList<Double>> proportions = TheoreticalSensitivity.proportionsAboveThresholds(sums, thresholds);
Assert.assertEquals(proportions.size(), 3);

Assert.assertEquals(proportions.get(0).get(0).doubleValue(), (double) 3 / 3);
Assert.assertEquals(proportions.get(0).get(1).doubleValue(), (double) 0 / 3);
Assert.assertEquals(proportions.get(0).get(2).doubleValue(), (double) 0 / 3);
Assert.assertEquals(proportions.get(1).get(0).doubleValue(), (double) 2 / 2);
Assert.assertEquals(proportions.get(1).get(1).doubleValue(), (double) 2 / 2);
Assert.assertEquals(proportions.get(1).get(2).doubleValue(), (double) 2 / 2);
Assert.assertEquals(proportions.get(2).get(0).doubleValue(), (double) 3 / 4);
Assert.assertEquals(proportions.get(2).get(1).doubleValue(), (double) 3 / 4);
Assert.assertEquals(proportions.get(2).get(2).doubleValue(), (double) 1 / 4);
Assert.assertEquals(proportions.get(0).get(0), (double) 3 / 3);
Assert.assertEquals(proportions.get(0).get(1), (double) 0 / 3);
Assert.assertEquals(proportions.get(0).get(2), (double) 0 / 3);
Assert.assertEquals(proportions.get(1).get(0), (double) 2 / 2);
Assert.assertEquals(proportions.get(1).get(1), (double) 2 / 2);
Assert.assertEquals(proportions.get(1).get(2), (double) 2 / 2);
Assert.assertEquals(proportions.get(2).get(0), (double) 3 / 4);
Assert.assertEquals(proportions.get(2).get(1), (double) 3 / 4);
Assert.assertEquals(proportions.get(2).get(2), (double) 1 / 4);
}

@Test
Expand All @@ -93,7 +93,7 @@ public void testHetAltDepthDistribution() throws Exception {

final long binomialCoefficient = CombinatoricsUtils.binomialCoefficient(n, m);

Assert.assertEquals(distribution.get(n).get(m).doubleValue(), binomialCoefficient * Math.pow(p, n));
Assert.assertEquals(distribution.get(n).get(m), binomialCoefficient * Math.pow(p, n));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public void testGetValueFromVcfOtherHeaderLine() throws ParseException {
Assert.assertEquals(InfiniumVcfFields.getOptionalValueFromVcfOtherHeaderLine(header, InfiniumVcfFields.PIPELINE_VERSION), "IlluminaGenotypingArray_v1.5");
Assert.assertEquals(InfiniumVcfFields.getIntegerFromVcfOtherHeaderLine(header, InfiniumVcfFields.ANALYSIS_VERSION_NUMBER).intValue(), 1);
Assert.assertEquals(InfiniumVcfFields.getValueFromVcfOtherHeaderLine(header, InfiniumVcfFields.EXTENDED_ILLUMINA_MANIFEST_VERSION), "1.3");
Assert.assertEquals(InfiniumVcfFields.getOptionalDoubleFromVcfOtherHeaderLine(header, InfiniumVcfFields.GTC_CALL_RATE).doubleValue(), 0.985);
Assert.assertEquals(InfiniumVcfFields.getOptionalDoubleFromVcfOtherHeaderLine(header, InfiniumVcfFields.GTC_CALL_RATE), 0.985);
Assert.assertEquals(InfiniumVcfFields.getOptionalValueFromVcfOtherHeaderLine(header, InfiniumVcfFields.AUTOCALL_GENDER), "M");
Assert.assertNull(InfiniumVcfFields.getOptionalValueFromVcfOtherHeaderLine(header, "nothing"));
Assert.assertNull(InfiniumVcfFields.getOptionalIntegerFromVcfOtherHeaderLine(header, "nothing"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ private void runStandardTest(final int[] lanes, final String jobName, final Stri
final MetricsFile<BarcodeMetric, Integer> metrics = new MetricsFile<>();
metrics.read(new FileReader(metricsFile));
Assert.assertEquals(metrics.getMetrics().get(3).PERFECT_MATCHES, expectedPfMatches);
Assert.assertEquals(metrics.getMetrics().get(3).PCT_MATCHES, expectedPctMatches.doubleValue());
Assert.assertEquals(metrics.getMetrics().get(3).PCT_MATCHES, expectedPctMatches);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ private void runStandardTest(final int[] lanes, final String jobName, final Stri
final MetricsFile<BarcodeMetric, Integer> metrics = new MetricsFile<>();
metrics.read(new FileReader(metricsFile));
Assert.assertEquals(metrics.getMetrics().get(3).PERFECT_MATCHES, expectedPfMatches);
Assert.assertEquals(metrics.getMetrics().get(3).PCT_MATCHES, expectedPctMatches.doubleValue());
Assert.assertEquals(metrics.getMetrics().get(3).PCT_MATCHES, expectedPctMatches);
}
} finally {
IOUtil.recursiveDelete(outputDir);
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/picard/metrics/CollectRrbsMetricsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ public void chrMReads() throws Exception {
Assert.assertEquals(metrics.READS_ALIGNED.intValue(), 5);
Assert.assertEquals(metrics.NON_CPG_BASES.intValue(), 15);
Assert.assertEquals(metrics.NON_CPG_CONVERTED_BASES.intValue(), 11);
Assert.assertEquals(metrics.PCT_NON_CPG_BASES_CONVERTED.doubleValue(), 0.733333);
Assert.assertEquals(metrics.PCT_NON_CPG_BASES_CONVERTED, 0.733333);
Assert.assertEquals(metrics.CPG_BASES_SEEN.intValue(), 5);
Assert.assertEquals(metrics.CPG_BASES_CONVERTED.intValue(), 1);
Assert.assertEquals(metrics.PCT_CPG_BASES_CONVERTED.doubleValue(), 0.2);
Assert.assertEquals(metrics.MEAN_CPG_COVERAGE.doubleValue(), 1.666667);
Assert.assertEquals(metrics.PCT_CPG_BASES_CONVERTED, 0.2);
Assert.assertEquals(metrics.MEAN_CPG_COVERAGE, 1.666667);
Assert.assertEquals(metrics.MEDIAN_CPG_COVERAGE.intValue(), 2);
Assert.assertEquals(metrics.READS_WITH_NO_CPG.intValue(), 1);
Assert.assertEquals(metrics.READS_IGNORED_SHORT.intValue(), 1);
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/picard/sam/DuplicationMetricsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private DuplicationMetrics nonEmptyMetrics(final int scale) {

@Test
public void testEmptyDuplicationMetricsDerivation(){
Assert.assertEquals(emptyMetrics().PERCENT_DUPLICATION.doubleValue(), 0.0);
Assert.assertEquals(emptyMetrics().PERCENT_DUPLICATION, 0.0);
}

@Test(dataProvider="testMergeDataProvider")
Expand Down

0 comments on commit bd50c59

Please sign in to comment.