DriverCatalogFactory { static double probabilityDriverVariant(long sampleSNVCount, @NotNull final DndsDriverImpactLikelihood likelihood) { return probabilityDriverVariantSameImpact(0, sampleSNVCount, likelihood); } private  DriverCatalogFactory();   }
@Test public void testHIST2H3DMissense() { double value = DriverCatalogFactory.probabilityDriverVariant(27742, onco.get("HIST2H3D")); assertEquals(0.6109, value, EPSILON); }
@Test public void testABL1Missense() { double value = DriverCatalogFactory.probabilityDriverVariant(996698, onco.get("ABL1")); assertEquals(0.0039, value, EPSILON); }
@Test public void testGATA3Indel() { double value = DriverCatalogFactory.probabilityDriverVariant(587, tsg.get("GATA3").indel()); assertEquals(0.9956, value, EPSILON); }
@Test public void testMultipleZeroNonDriver() { DndsDriverImpactLikelihood indelLikelihood = ImmutableDndsDriverImpactLikelihood.builder().dndsLikelihood(1).driversPerSample(0.01).passengersPerMutation(0).build(); double value = DriverCatalogFactory.probabilityDriverVariant(1000, 1000, indelLikelihood, indelLikelihood); assertEquals(0, value, EPSILON); }
@Test public void testFallBackOnSingleProbabilityIfMultiFailsDueToZeroValues() { DndsDriverImpactLikelihood nonsense = ImmutableDndsDriverImpactLikelihood.builder().dndsLikelihood(0.7).driversPerSample(2E-4).passengersPerMutation(4E-9).build(); double singleNonsenseLikelihood = DriverCatalogFactory.probabilityDriverVariant(1, nonsense); assertTrue(singleNonsenseLikelihood - 0.1 > nonsense.dndsLikelihood()); DndsDriverImpactLikelihood splice = ImmutableDndsDriverImpactLikelihood.builder().dndsLikelihood(0).driversPerSample(0).passengersPerMutation(0).build(); assertEquals(0, splice.dndsLikelihood(), EPSILON); assertEquals(0, DriverCatalogFactory.probabilityDriverVariant(1, splice), EPSILON); double victim = DriverCatalogFactory.probabilityDriverVariant(1, 1, nonsense, splice); assertEquals(singleNonsenseLikelihood, victim, EPSILON); victim = DriverCatalogFactory.probabilityDriverVariant(1, 1, splice, nonsense); assertEquals(singleNonsenseLikelihood, victim, EPSILON); }
@Test public void testZeroNonDriverWithStandard() { DndsDriverImpactLikelihood indelLikelihood = ImmutableDndsDriverImpactLikelihood.builder().dndsLikelihood(1).driversPerSample(0.01).passengersPerMutation(0).build(); DndsDriverImpactLikelihood missenseLikelihood = ImmutableDndsDriverImpactLikelihood.builder().dndsLikelihood(0.87).driversPerSample(0.01).passengersPerMutation(10e-8).build(); double expectedMissense = DriverCatalogFactory.probabilityDriverVariant(10000, missenseLikelihood); double value = DriverCatalogFactory.probabilityDriverVariant(10000, 1000, missenseLikelihood, indelLikelihood); assertEquals(expectedMissense, value, EPSILON); }